Package akka.serialization
Interface AsyncSerializer
-
- All Known Implementing Classes:
AsyncSerializerWithStringManifest
,AsyncSerializerWithStringManifestCS
public interface AsyncSerializer
Serializer that supports async serialization.Only used for Akka persistence journals that explicitly support async serializers.
Implementations should typically extend
AsyncSerializerWithStringManifest
orAsyncSerializerWithStringManifestCS
that delegates synchronous calls to their async equivalents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.concurrent.Future<java.lang.Object>
fromBinaryAsync(byte[] bytes, java.lang.String manifest)
Produces an object from an array of bytes, with an optional type-hint.scala.concurrent.Future<byte[]>
toBinaryAsync(java.lang.Object o)
Serializes the given object into an Array of Byte.
-
-
-
Method Detail
-
fromBinaryAsync
scala.concurrent.Future<java.lang.Object> fromBinaryAsync(byte[] bytes, java.lang.String manifest)
Produces an object from an array of bytes, with an optional type-hint.
-
toBinaryAsync
scala.concurrent.Future<byte[]> toBinaryAsync(java.lang.Object o)
Serializes the given object into an Array of Byte.Note that the array must not be mutated by the serializer after it has been used to complete the returned
Future
.
-
-