public class ReplicatorMessageSerializer extends SerializerWithStringManifest implements SerializationSupport, BaseSerializer
Modifier and Type | Class and Description |
---|---|
static class |
ReplicatorMessageSerializer.SmallCache<A,B>
A cache that is designed for a small number (<= 32) of
entries.
|
Constructor and Description |
---|
ReplicatorMessageSerializer(ExtendedActorSystem system) |
Modifier and Type | Method and Description |
---|---|
static Address |
addressFromProto(ReplicatorMessages.Address address) |
static java.lang.String |
addressProtocol() |
static ReplicatorMessages.Address.Builder |
addressToProto(Address address) |
static void |
akka$cluster$ddata$protobuf$SerializationSupport$$protocol_$eq(java.lang.String x$1) |
static java.lang.String |
akka$cluster$ddata$protobuf$SerializationSupport$$protocol() |
static void |
akka$cluster$ddata$protobuf$SerializationSupport$$ser_$eq(Serialization x$1) |
static Serialization |
akka$cluster$ddata$protobuf$SerializationSupport$$ser() |
static void |
akka$cluster$ddata$protobuf$SerializationSupport$$transportInfo_$eq(Serialization.Information x$1) |
static Serialization.Information |
akka$cluster$ddata$protobuf$SerializationSupport$$transportInfo() |
protected abstract static void |
akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1) |
java.lang.String |
ChangedManifest() |
static byte[] |
compress(akka.protobuf.MessageLite msg) |
java.lang.String |
DataEnvelopeManifest() |
static byte[] |
decompress(byte[] bytes) |
java.lang.String |
DurableDataEnvelopeManifest() |
java.lang.Object |
fromBinary(byte[] bytes,
java.lang.String manifest)
Produces an object from an array of bytes, with an optional type-hint;
the class should be loaded using ActorSystem.dynamicAccess.
|
java.lang.String |
GetFailureManifest() |
java.lang.String |
GetManifest() |
java.lang.String |
GetSuccessManifest() |
java.lang.String |
GossipManifest() |
int |
identifier()
Completely unique value to identify this implementation of Serializer, used to optimize network traffic.
|
static int |
identifierFromConfig() |
static boolean |
includeManifest() |
java.lang.String |
manifest(java.lang.Object obj)
Return the manifest (type hint) that will be provided in the fromBinary method.
|
java.lang.String |
NotFoundManifest() |
static java.lang.Object |
otherMessageFromBinary(byte[] bytes) |
static java.lang.Object |
otherMessageFromProto(ReplicatorMessages.OtherMessage other) |
static ReplicatorMessages.OtherMessage |
otherMessageToProto(java.lang.Object msg) |
java.lang.String |
ReadManifest() |
java.lang.String |
ReadResultManifest() |
static ActorRef |
resolveActorRef(java.lang.String path) |
static Serialization |
serialization() |
static java.lang.String |
SerializationIdentifiers() |
java.lang.String |
StatusManifest() |
java.lang.String |
SubscribeManifest() |
ExtendedActorSystem |
system()
Actor system which is required by most serializer implementations.
|
byte[] |
toBinary(java.lang.Object obj)
Serializes the given object into an Array of Byte
|
static Serialization.Information |
transportInformation() |
static UniqueAddress |
uniqueAddressFromProto(ReplicatorMessages.UniqueAddress uniqueAddress) |
static ReplicatorMessages.UniqueAddress.Builder |
uniqueAddressToProto(UniqueAddress uniqueAddress) |
java.lang.String |
UnsubscribeManifest() |
java.lang.String |
WriteAckManifest() |
java.lang.String |
WriteManifest() |
java.lang.String |
WriteNackManifest() |
fromBinary, includeManifest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addressFromProto, addressProtocol, addressToProto, BufferSize, compress, decompress, otherMessageFromBinary, otherMessageFromProto, otherMessageToProto, resolveActorRef, serialization, transportInformation, uniqueAddressFromProto, uniqueAddressToProto
identifierFromConfig, SerializationIdentifiers
fromBinary, fromBinary, fromBinary, includeManifest
public ReplicatorMessageSerializer(ExtendedActorSystem system)
public static final boolean includeManifest()
public static Serialization akka$cluster$ddata$protobuf$SerializationSupport$$ser()
public static void akka$cluster$ddata$protobuf$SerializationSupport$$ser_$eq(Serialization x$1)
public static Serialization serialization()
public static java.lang.String akka$cluster$ddata$protobuf$SerializationSupport$$protocol()
public static void akka$cluster$ddata$protobuf$SerializationSupport$$protocol_$eq(java.lang.String x$1)
public static java.lang.String addressProtocol()
public static Serialization.Information akka$cluster$ddata$protobuf$SerializationSupport$$transportInfo()
public static void akka$cluster$ddata$protobuf$SerializationSupport$$transportInfo_$eq(Serialization.Information x$1)
public static Serialization.Information transportInformation()
public static byte[] compress(akka.protobuf.MessageLite msg)
public static byte[] decompress(byte[] bytes)
public static ReplicatorMessages.Address.Builder addressToProto(Address address)
public static Address addressFromProto(ReplicatorMessages.Address address)
public static ReplicatorMessages.UniqueAddress.Builder uniqueAddressToProto(UniqueAddress uniqueAddress)
public static UniqueAddress uniqueAddressFromProto(ReplicatorMessages.UniqueAddress uniqueAddress)
public static ActorRef resolveActorRef(java.lang.String path)
public static ReplicatorMessages.OtherMessage otherMessageToProto(java.lang.Object msg)
public static java.lang.Object otherMessageFromBinary(byte[] bytes)
public static java.lang.Object otherMessageFromProto(ReplicatorMessages.OtherMessage other)
public static final java.lang.String SerializationIdentifiers()
public static int identifierFromConfig()
protected abstract static void akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)
public int identifier()
SerializerWithStringManifest
identifier
in interface BaseSerializer
identifier
in interface Serializer
identifier
in class SerializerWithStringManifest
public ExtendedActorSystem system()
BaseSerializer
system
in interface SerializationSupport
system
in interface BaseSerializer
public java.lang.String GetManifest()
public java.lang.String GetSuccessManifest()
public java.lang.String NotFoundManifest()
public java.lang.String GetFailureManifest()
public java.lang.String SubscribeManifest()
public java.lang.String UnsubscribeManifest()
public java.lang.String ChangedManifest()
public java.lang.String DataEnvelopeManifest()
public java.lang.String WriteManifest()
public java.lang.String WriteAckManifest()
public java.lang.String ReadManifest()
public java.lang.String ReadResultManifest()
public java.lang.String StatusManifest()
public java.lang.String GossipManifest()
public java.lang.String WriteNackManifest()
public java.lang.String DurableDataEnvelopeManifest()
public java.lang.String manifest(java.lang.Object obj)
SerializerWithStringManifest
""
if manifest is not needed.manifest
in class SerializerWithStringManifest
obj
- (undocumented)public byte[] toBinary(java.lang.Object obj)
SerializerWithStringManifest
toBinary
in interface Serializer
toBinary
in class SerializerWithStringManifest
obj
- (undocumented)public java.lang.Object fromBinary(byte[] bytes, java.lang.String manifest)
SerializerWithStringManifest
It's recommended to throw java.io.NotSerializableException
in fromBinary
if the manifest is unknown. This makes it possible to introduce new message
types and send them to nodes that don't know about them. This is typically
needed when performing rolling upgrades, i.e. running a cluster with mixed
versions for while. NotSerializableException
is treated as a transient
problem in the TCP based remoting layer. The problem will be logged
and message is dropped. Other exceptions will tear down the TCP connection
because it can be an indication of corrupt bytes from the underlying transport.
fromBinary
in class SerializerWithStringManifest
bytes
- (undocumented)manifest
- (undocumented)