Package akka.cluster.ddata.protobuf
Class ReplicatorMessageSerializer
- java.lang.Object
-
- akka.serialization.SerializerWithStringManifest
-
- akka.cluster.ddata.protobuf.ReplicatorMessageSerializer
-
- All Implemented Interfaces:
SerializationSupport
,BaseSerializer
,Serializer
public class ReplicatorMessageSerializer extends SerializerWithStringManifest implements SerializationSupport, BaseSerializer
Protobuf serializer of ReplicatorMessage messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReplicatorMessageSerializer.SmallCache<A,B>
A cache that is designed for a small number (<= 32) of entries.
-
Constructor Summary
Constructors Constructor Description ReplicatorMessageSerializer(ExtendedActorSystem system)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)
Globally unique serialization identifier configured in thereference.conf
.java.lang.String
ChangedManifest()
java.lang.String
DataEnvelopeManifest()
java.lang.String
DeltaNackManifest()
java.lang.String
DeltaPropagationManifest()
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.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.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()
java.lang.String
ReadManifest()
java.lang.String
ReadResultManifest()
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.java.lang.String
UnsubscribeManifest()
java.lang.String
WriteAckManifest()
java.lang.String
WriteManifest()
java.lang.String
WriteNackManifest()
-
Methods inherited from class akka.serialization.SerializerWithStringManifest
fromBinary, includeManifest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.serialization.BaseSerializer
identifierFromConfig, SerializationIdentifiers
-
Methods inherited from interface akka.cluster.ddata.protobuf.SerializationSupport
addressFromProto, addressProtocol, addressToProto, BufferSize, compress, decompress, otherMessageFromBinary, otherMessageFromProto, otherMessageToProto, protocol_$eq, resolveActorRef, ser_$eq, serialization, transportInfo_$eq, transportInformation, uniqueAddressFromProto, uniqueAddressToProto, versionVectorFromBinary, versionVectorFromProto, versionVectorToProto
-
Methods inherited from interface akka.serialization.Serializer
fromBinary, fromBinary, fromBinary, includeManifest
-
-
-
-
Constructor Detail
-
ReplicatorMessageSerializer
public ReplicatorMessageSerializer(ExtendedActorSystem system)
-
-
Method Detail
-
identifier
public int identifier()
Description copied from class:SerializerWithStringManifest
Completely unique value to identify this implementation of Serializer, used to optimize network traffic. Values from 0 to 40 are reserved for Akka internal usage.- Specified by:
identifier
in interfaceBaseSerializer
- Specified by:
identifier
in interfaceSerializer
- Specified by:
identifier
in classSerializerWithStringManifest
-
akka$serialization$BaseSerializer$_setter_$identifier_$eq
protected void akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)
Description copied from interface:BaseSerializer
Globally unique serialization identifier configured in thereference.conf
.See
Serializer.identifier
.- Specified by:
akka$serialization$BaseSerializer$_setter_$identifier_$eq
in interfaceBaseSerializer
-
system
public ExtendedActorSystem system()
Description copied from interface:BaseSerializer
Actor system which is required by most serializer implementations.- Specified by:
system
in interfaceBaseSerializer
- Specified by:
system
in interfaceSerializationSupport
-
GetManifest
public java.lang.String GetManifest()
-
GetSuccessManifest
public java.lang.String GetSuccessManifest()
-
NotFoundManifest
public java.lang.String NotFoundManifest()
-
GetFailureManifest
public java.lang.String GetFailureManifest()
-
SubscribeManifest
public java.lang.String SubscribeManifest()
-
UnsubscribeManifest
public java.lang.String UnsubscribeManifest()
-
ChangedManifest
public java.lang.String ChangedManifest()
-
DataEnvelopeManifest
public java.lang.String DataEnvelopeManifest()
-
WriteManifest
public java.lang.String WriteManifest()
-
WriteAckManifest
public java.lang.String WriteAckManifest()
-
ReadManifest
public java.lang.String ReadManifest()
-
ReadResultManifest
public java.lang.String ReadResultManifest()
-
StatusManifest
public java.lang.String StatusManifest()
-
GossipManifest
public java.lang.String GossipManifest()
-
WriteNackManifest
public java.lang.String WriteNackManifest()
-
DurableDataEnvelopeManifest
public java.lang.String DurableDataEnvelopeManifest()
-
DeltaPropagationManifest
public java.lang.String DeltaPropagationManifest()
-
DeltaNackManifest
public java.lang.String DeltaNackManifest()
-
manifest
public java.lang.String manifest(java.lang.Object obj)
Description copied from class:SerializerWithStringManifest
Return the manifest (type hint) that will be provided in the fromBinary method. Use""
if manifest is not needed.- Specified by:
manifest
in classSerializerWithStringManifest
-
toBinary
public byte[] toBinary(java.lang.Object obj)
Description copied from class:SerializerWithStringManifest
Serializes the given object into an Array of Byte.Note that the array must not be mutated by the serializer after it has been returned.
- Specified by:
toBinary
in interfaceSerializer
- Specified by:
toBinary
in classSerializerWithStringManifest
-
fromBinary
public java.lang.Object fromBinary(byte[] bytes, java.lang.String manifest)
Description copied from class:SerializerWithStringManifest
Produces an object from an array of bytes, with an optional type-hint.It's recommended to throw
java.io.NotSerializableException
infromBinary
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.- Specified by:
fromBinary
in classSerializerWithStringManifest
-
-