-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
189 additions
and
94 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 5 additions & 2 deletions
7
admin-console/src/main/kotlin/io/mailit/admin/console/http/dto/ApiKeyDtos.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
...c/main/kotlin/io/mailit/persistence/common/serialization/KryoMailMessageDataSerializer.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...n/src/main/kotlin/io/mailit/persistence/common/serialization/kryo/KryoClassSerializers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.mailit.persistence.common.serialization.kryo | ||
|
||
import com.esotericsoftware.kryo.Kryo | ||
import com.esotericsoftware.kryo.Serializer | ||
import com.esotericsoftware.kryo.io.Input | ||
import com.esotericsoftware.kryo.io.Output | ||
|
||
internal object MailDataMapSerializer : Serializer<Map<String, Any>>() { | ||
|
||
override fun write(kryo: Kryo, output: Output, map: Map<String, Any>) { | ||
val size = map.size | ||
output.writeVarInt(size, true) | ||
|
||
map.forEach { (key, value) -> | ||
output.writeString(key) | ||
kryo.writeClassAndObject(output, value) | ||
} | ||
} | ||
|
||
override fun read(kryo: Kryo, input: Input, type: Class<out Map<String, Any>>): Map<String, Any> { | ||
val size = input.readVarInt(true) | ||
|
||
val map = HashMap<String, Any>(size) | ||
|
||
for (i in 1..size) { | ||
val key = input.readString() | ||
val value = kryo.readClassAndObject(input) | ||
map[key] = value | ||
} | ||
|
||
return map | ||
} | ||
} | ||
|
||
internal object MailDataCollectionSerializer : Serializer<Collection<Any>>() { | ||
|
||
override fun write(kryo: Kryo, output: Output, collection: Collection<Any>) { | ||
val size = collection.size | ||
output.writeVarInt(size, true) | ||
|
||
collection.forEach { kryo.writeClassAndObject(output, it) } | ||
} | ||
|
||
override fun read(kryo: Kryo, input: Input, type: Class<out Collection<Any>>): Collection<Any> { | ||
val size = input.readVarInt(true) | ||
|
||
val collection = ArrayList<Any>(size) | ||
|
||
for (i in 1..size) { | ||
collection += kryo.readClassAndObject(input) | ||
} | ||
|
||
return collection | ||
} | ||
} |
Oops, something went wrong.