-
Notifications
You must be signed in to change notification settings - Fork 73
/
reference.conf
247 lines (224 loc) · 10.4 KB
/
reference.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#########################################################
# Akka akka-kryo-serializer Reference Config File #
#########################################################
# This is the reference config file that contains all the default settings.
# Make your edits/overrides in your application.conf.
akka-kryo-serialization {
# Possibles values for type are: graph or nograph
# graph supports serialization of object graphs with shared nodes
# and cyclic references, but this comes at the expense of a small overhead
# nograph does not support object graphs with shared nodes, but is usually faster
type = "graph"
# Possible values for id-strategy are:
# default, explicit, incremental, automatic
#
# default - slowest and produces bigger serialized representation. Contains fully-
# qualified class names (FQCNs) for each class
#
# explicit - fast and produces compact serialized representation. Requires that all
# classes that will be serialized are pre-registered using the "mappings" and "classes"
# sections. To guarantee that both sender and receiver use the same numeric ids for the same
# classes it is advised to provide exactly the same entries in the "mappings" section
#
# incremental - fast and produces compact serialized representation. Support optional
# pre-registering of classes using the "mappings" and "classes" sections. If class is
# not pre-registered, it will be registered dynamically by picking a next available id
# To guarantee that both sender and receiver use the same numeric ids for the same
# classes it is advised to pre-register them using at least the "classes" section
#
# automatic - Contains fully-qualified class names (FQCNs) for each class that is not
# pre-registered in the "mappings" and "classes" section
id-strategy = "default"
# Define a default size for byte buffers used during serialization
buffer-size = 4096
# The serialization byte buffers are doubled as needed until they exceed
# maxBufferSize and an exception is thrown. Can be -1 for no maximum.
# must be < akka.remote.artery.advanced.maximum-frame-size
max-buffer-size = -1
# To use a custom queue the [[io.altoo.akka.serialization.kryo.DefaultQueueBuilder]]
# can be extended and registered here.
queue-builder = "io.altoo.akka.serialization.kryo.DefaultQueueBuilder"
# If set, akka uses manifests to put a class name
# of the top-level object into each message
use-manifests = false
# If set it will use the UnsafeInput and UnsafeOutput
# Kyro IO instances. Please note that there is no guarantee
# for backward/forward compatibility of unsafe serialization.
# It is also not compatible with the safe-serialized values
use-unsafe = false
# The transformations that have be done while serialization
# Supported transformations: compression and encryption
# accepted values(comma separated if multiple): off | lz4 | deflate | aes
# Transformations occur in the order they are specified on serialization
# and reverse order on deserialization. For example: "lz4,aes"
# lz4 usually offers a good middle ground between size and performance.
post-serialization-transformations = "off"
# Settings for aes encryption, if included in transformations AES
# algo mode, key and custom key class can be specified AES algo mode.
# The configured key provider class `io.altoo.akka.serialization.kryo.DefaultKeyProvider`
# derives a key from the configured password and salt.
# To dynamically provide an aes key extend the `io.altoo.akka.serialization.kryo.DefaultKeyProvider`
# and configure it here.
#
# Example configuration:
# encryption {
# aes {
# key-provider = "io.altoo.akka.serialization.kryo.DefaultKeyProvider"
# mode = "AES/GCM/NoPadding"
# iv-length = 12
# # password/salt properties are only required when using the default key provider
# password = j68KkRjq21ykRGAQ
# salt = pepper
# }
# }
# Log implicitly registered classes. Useful, if you want to know all classes
# which are serialized
implicit-registration-logging = false
# If enabled, Kryo logs a lot of information about serialization process.
# Useful for debugging and low-level tweaking
kryo-trace = false
# If enabled, Kryo uses internally a map detecting shared nodes.
# This is a preferred mode for big object graphs with a lot of nodes.
# For small object graphs (e.g. below 10 nodes) set it to false for
# better performance.
kryo-reference-map = true
# For more advanced customizations the [[io.altoo.akka.serialization.kryo.DefaultKryoInitializer]]
# can be subclassed and configured here.
# The preInit can be used to change the default field serializer.
# The postInit can be used to register additional serializers and classes.
kryo-initializer = "io.altoo.akka.serialization.kryo.DefaultKryoInitializer"
# If enabled, allows Kryo to resolve subclasses of registered Types.
#
# This is primarily useful when id-strategy is set to "explicit". In this
# case, all classes to be serialized must be explicitly registered. The
# problem is that a large number of common Scala and Akka types (such as
# Map and ActorRef) are actually traits that mask a large number of
# specialized classes that deal with various situations and optimizations.
# It isn't straightforward to register all of these, so you can instead
# register a single supertype, with a serializer that can handle *all* of
# the subclasses, and the subclasses get serialized with that.
#
# Use this with care: you should only rely on this when you are confident
# that the superclass serializer covers all of the special cases properly.
resolve-subclasses = false
# Define mappings from a fully qualified class name to a numeric id.
# Using ids instead of FQCN leads to smaller sizes of serialized representations
# and faster serialization.
#
# This section is mandatory for idstartegy=explicit
# This section is optional for idstartegy=incremental
# This section is ignored for idstartegy=default
#
# The smallest possible id should start at 20 (or even higher), because
# ids below it are used by Kryo internally e.g. for built-in Java and
# Scala types.
#
# Some helpful mappings are provided through `supplied-basic-mappings`
# and can be added/extended by:
#
# mappings = ${akka-kryo-serialization.optional-basic-mappings} {
# fully.qualified.classname1 = id1
# fully.qualified.classname2 = id2
# }
#
mappings {
# fully.qualified.classname1 = id1
# fully.qualified.classname2 = id2
}
# Define a set of fully qualified class names for
# classes to be used for serialization.
# The ids for those classes will be assigned automatically,
# but respecting the order of declaration in this section
#
# This section is optional for idstartegy=incremental
# This section is ignored for idstartegy=default
# This section is optional for idstartegy=explicit
classes = [
# fully.qualified.classname1
# fully.qualified.classname2
]
# Note: even though only to be helpful, these mappings are considered
# part of the api and changes are to be considered breaking the api
optional-basic-mappings {
// java
"java.util.UUID" = 30
"java.time.LocalDate" = 31
"java.time.LocalDateTime" = 32
"java.time.LocalTime" = 33
"java.time.ZoneOffset" = 34
"java.time.ZoneRegion" = 35
"java.time.ZonedDateTime" = 36
"java.time.Instant" = 37
"java.time.Duration" = 38
// scala
"scala.Some" = 50
"scala.None$" = 51
"scala.util.Left" = 52
"scala.util.Right" = 53
"scala.util.Success" = 54
"scala.util.Failure" = 55
"scala.Tuple2" = 60
"scala.Tuple3" = 61
"scala.Tuple4" = 62
"scala.Tuple5" = 63
"scala.Tuple6" = 64
"scala.Tuple7" = 65
"scala.Tuple8" = 66
}
optional-scala2_12-mappings = {
"scala.collection.immutable.Nil$" = 70
"scala.collection.immutable.$colon$colon" = 71
"scala.collection.immutable.Map$EmptyMap$" = 72
"scala.collection.immutable.Map$Map1" = 73
"scala.collection.immutable.Map$Map2" = 74
"scala.collection.immutable.Map$Map3" = 75
"scala.collection.immutable.Map$Map4" = 76
"scala.collection.immutable.Set$EmptySet$" = 77
"scala.collection.immutable.Set$Set1" = 78
"scala.collection.immutable.Set$Set2" = 79
"scala.collection.immutable.Set$Set3" = 80
"scala.collection.immutable.Set$Set4" = 81
"scala.collection.immutable.ArraySeq$ofRef" = 82
"scala.collection.immutable.ArraySeq$ofInt" = 83
"scala.collection.immutable.ArraySeq$ofDouble" = 84
"scala.collection.immutable.ArraySeq$ofLong" = 85
"scala.collection.immutable.ArraySeq$ofFloat" = 86
"scala.collection.immutable.ArraySeq$ofChar" = 87
"scala.collection.immutable.ArraySeq$ofByte" = 88
"scala.collection.immutable.ArraySeq$ofShort" = 89
"scala.collection.immutable.ArraySeq$ofBoolean" = 90
"scala.collection.immutable.ArraySeq$ofUnit" = 91
}
# note: Vector is only available from 2.13.2 and above - for 2.13.0 or 2.13.1 use the optional-scala2_12-mappings
optional-scala2_13-mappings = {
"scala.collection.immutable.Nil$" = 70
"scala.collection.immutable.$colon$colon" = 71
"scala.collection.immutable.Map$EmptyMap$" = 72
"scala.collection.immutable.Map$Map1" = 73
"scala.collection.immutable.Map$Map2" = 74
"scala.collection.immutable.Map$Map3" = 75
"scala.collection.immutable.Map$Map4" = 76
"scala.collection.immutable.Set$EmptySet$" = 77
"scala.collection.immutable.Set$Set1" = 78
"scala.collection.immutable.Set$Set2" = 79
"scala.collection.immutable.Set$Set3" = 80
"scala.collection.immutable.Set$Set4" = 81
"scala.collection.immutable.ArraySeq$ofRef" = 82
"scala.collection.immutable.ArraySeq$ofInt" = 83
"scala.collection.immutable.ArraySeq$ofDouble" = 84
"scala.collection.immutable.ArraySeq$ofLong" = 85
"scala.collection.immutable.ArraySeq$ofFloat" = 86
"scala.collection.immutable.ArraySeq$ofChar" = 87
"scala.collection.immutable.ArraySeq$ofByte" = 88
"scala.collection.immutable.ArraySeq$ofShort" = 89
"scala.collection.immutable.ArraySeq$ofBoolean" = 90
"scala.collection.immutable.ArraySeq$ofUnit" = 91
"scala.collection.immutable.Vector0$" = 92
"scala.collection.immutable.Vector1" = 93
"scala.collection.immutable.Vector2" = 94
"scala.collection.immutable.Vector3" = 95
"scala.collection.immutable.Vector4" = 96
"scala.collection.immutable.Vector5" = 97
"scala.collection.immutable.Vector6" = 98
}
}