Class JacksonSerializer$
java.lang.Object
org.apache.pekko.serialization.jackson3.JacksonSerializer$
INTERNAL API
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JacksonSerializer$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckOtherJacksonModuleNotOnClasspath(DynamicAccess dynamicAccess) pekko-serialization-jackson and pekko-serialization-jackson3 register serializers with the same names and identifiers, so whicheverreference.confis merged last silently takes over all bindings of both modules.scala.collection.immutable.Set<Class<?>>intinitialCompressBufferSize(int uncompressedSize) Initial size of the buffer that a payload is compressed into: a quarter of its size (JSON and CBOR typically compress at least that well), but at least 4 KiB.intinitialDecompressBufferSize(int compressedSize, long maxDecompressedSize) Initial size of the buffer that a compressed payload is decompressed into when its decompressed size is not known up front.booleanisGZipped(byte[] bytes) booleanisLZ4(byte[] bytes) booleanisZstd(byte[] bytes)
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
JacksonSerializer$
public JacksonSerializer$()
-
-
Method Details
-
checkOtherJacksonModuleNotOnClasspath
pekko-serialization-jackson and pekko-serialization-jackson3 register serializers with the same names and identifiers, so whicheverreference.confis merged last silently takes over all bindings of both modules. Fail fast instead. -
disallowedSerializationBindings
-
isGZipped
public boolean isGZipped(byte[] bytes) -
isLZ4
public boolean isLZ4(byte[] bytes) -
initialDecompressBufferSize
public int initialDecompressBufferSize(int compressedSize, long maxDecompressedSize) Initial size of the buffer that a compressed payload is decompressed into when its decompressed size is not known up front. JSON and CBOR typically compress 3-10x, so 4x the compressed size avoids most resizing without allocating much more than needed. It is never larger than the configured maximum decompressed size allows, and capped so that a large payload grows the buffer rather than allocating a huge one up front. -
initialCompressBufferSize
public int initialCompressBufferSize(int uncompressedSize) Initial size of the buffer that a payload is compressed into: a quarter of its size (JSON and CBOR typically compress at least that well), but at least 4 KiB. -
isZstd
public boolean isZstd(byte[] bytes)
-