Package akka.cluster.ddata.protobuf
Class ReplicatedDataSerializer
- java.lang.Object
- 
- akka.serialization.SerializerWithStringManifest
- 
- akka.cluster.ddata.protobuf.ReplicatedDataSerializer
 
 
- 
- All Implemented Interfaces:
- SerializationSupport,- BaseSerializer,- Serializer
 
 public class ReplicatedDataSerializer extends SerializerWithStringManifest implements SerializationSupport, BaseSerializer Protobuf serializer of ReplicatedData.
- 
- 
Nested Class Summary
 - 
Constructor SummaryConstructors Constructor Description ReplicatedDataSerializer(ExtendedActorSystem system)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidakka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)Globally unique serialization identifier configured in thereference.conf.FlagflagFromBinary(byte[] bytes)FlagflagFromProto(ReplicatedDataMessages.Flag flag)ReplicatedDataMessages.FlagflagToProto(Flag flag)java.lang.ObjectfromBinary(byte[] bytes, java.lang.String manifest)Produces an object from an array of bytes, with an optional type-hint.GCountergcounterFromBinary(byte[] bytes)GCountergcounterFromProto(ReplicatedDataMessages.GCounter gcounter)ReplicatedDataMessages.GCountergcounterToProto(GCounter gcounter)GSet<?>gsetFromBinary(byte[] bytes)GSet<java.lang.Object>gsetFromProto(ReplicatedDataMessages.GSet gset)ReplicatedDataMessages.GSetgsetToProto(GSet<?> gset)intidentifier()Completely unique value to identify this implementation of Serializer, used to optimize network traffic.java.lang.StringkeyIdFromBinary(byte[] bytes)byte[]keyIdToBinary(java.lang.String id)LWWMap<java.lang.Object,java.lang.Object>lwwmapFromBinary(byte[] bytes)LWWMap<java.lang.Object,java.lang.Object>lwwmapFromProto(ReplicatedDataMessages.LWWMap lwwmap)ReplicatedDataMessages.LWWMaplwwmapToProto(LWWMap<?,?> lwwmap)LWWRegister<java.lang.Object>lwwRegisterFromBinary(byte[] bytes)LWWRegister<java.lang.Object>lwwRegisterFromProto(ReplicatedDataMessages.LWWRegister lwwRegister)ReplicatedDataMessages.LWWRegisterlwwRegisterToProto(LWWRegister<?> lwwRegister)java.lang.Stringmanifest(java.lang.Object obj)Return the manifest (type hint) that will be provided in the fromBinary method.<PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3,B extends ReplicatedData>
 scala.collection.immutable.Map<java.lang.Object,B>mapTypeFromProto(java.util.List<PEntry> input, scala.Function1<A,B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh)ORMultiMap<java.lang.Object,java.lang.Object>multimapFromBinary(byte[] bytes)ORMultiMap<java.lang.Object,java.lang.Object>multimapFromProto(ReplicatedDataMessages.ORMultiMap multimap)ReplicatedDataMessages.ORMultiMapmultimapToProto(ORMultiMap<?,?> multimap)ORMap<java.lang.Object,ReplicatedData>ormapFromBinary(byte[] bytes)ORMap<java.lang.Object,ReplicatedData>ormapFromProto(ReplicatedDataMessages.ORMap ormap)ReplicatedDataMessages.ORMapormapToProto(ORMap<?,?> ormap)ORSet<java.lang.Object>orsetFromBinary(byte[] bytes)ORSet<java.lang.Object>orsetFromProto(ReplicatedDataMessages.ORSet orset)ReplicatedDataMessages.ORSetorsetToProto(ORSet<?> orset)PNCounterpncounterFromBinary(byte[] bytes)PNCounterpncounterFromProto(ReplicatedDataMessages.PNCounter pncounter)PNCounterMap<?>pncountermapFromBinary(byte[] bytes)PNCounterMap<?>pncountermapFromProto(ReplicatedDataMessages.PNCounterMap pncountermap)ReplicatedDataMessages.PNCounterMappncountermapToProto(PNCounterMap<?> pncountermap)ReplicatedDataMessages.PNCounterpncounterToProto(PNCounter pncounter)<PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3>
 java.lang.ObjectsingleKeyEntryFromProto(scala.Option<PEntry> entryOption, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh)<PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3,B extends ReplicatedData>
 scala.collection.immutable.Map<java.lang.Object,B>singleMapEntryFromProto(java.util.List<PEntry> input, scala.Function1<A,B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh)ExtendedActorSystemsystem()Actor system which is required by most serializer implementations.byte[]toBinary(java.lang.Object obj)Serializes the given object into an Array of Byte.- 
Methods inherited from class akka.serialization.SerializerWithStringManifestfromBinary, includeManifest
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface akka.serialization.BaseSerializeridentifierFromConfig, SerializationIdentifiers
 - 
Methods inherited from interface akka.cluster.ddata.protobuf.SerializationSupportaddressFromProto, 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.SerializerfromBinary, fromBinary, fromBinary, includeManifest
 
- 
 
- 
- 
- 
Constructor Detail- 
ReplicatedDataSerializerpublic ReplicatedDataSerializer(ExtendedActorSystem system) 
 
- 
 - 
Method Detail- 
identifierpublic int identifier() Description copied from class:SerializerWithStringManifestCompletely 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:
- identifierin interface- BaseSerializer
- Specified by:
- identifierin interface- Serializer
- Specified by:
- identifierin class- SerializerWithStringManifest
 
 - 
akka$serialization$BaseSerializer$_setter_$identifier_$eqprotected void akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1) Description copied from interface:BaseSerializerGlobally unique serialization identifier configured in thereference.conf.See Serializer.identifier.- Specified by:
- akka$serialization$BaseSerializer$_setter_$identifier_$eqin interface- BaseSerializer
 
 - 
systempublic ExtendedActorSystem system() Description copied from interface:BaseSerializerActor system which is required by most serializer implementations.- Specified by:
- systemin interface- BaseSerializer
- Specified by:
- systemin interface- SerializationSupport
 
 - 
manifestpublic java.lang.String manifest(java.lang.Object obj) Description copied from class:SerializerWithStringManifestReturn the manifest (type hint) that will be provided in the fromBinary method. Use""if manifest is not needed.- Specified by:
- manifestin class- SerializerWithStringManifest
 
 - 
toBinarypublic byte[] toBinary(java.lang.Object obj) Description copied from class:SerializerWithStringManifestSerializes 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:
- toBinaryin interface- Serializer
- Specified by:
- toBinaryin class- SerializerWithStringManifest
 
 - 
fromBinarypublic java.lang.Object fromBinary(byte[] bytes, java.lang.String manifest)Description copied from class:SerializerWithStringManifestProduces an object from an array of bytes, with an optional type-hint.It's recommended to throw java.io.NotSerializableExceptioninfromBinaryif 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.NotSerializableExceptionis 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:
- fromBinaryin class- SerializerWithStringManifest
 
 - 
gsetToProtopublic ReplicatedDataMessages.GSet gsetToProto(GSet<?> gset) 
 - 
gsetFromBinarypublic GSet<?> gsetFromBinary(byte[] bytes) 
 - 
gsetFromProtopublic GSet<java.lang.Object> gsetFromProto(ReplicatedDataMessages.GSet gset) 
 - 
orsetToProtopublic ReplicatedDataMessages.ORSet orsetToProto(ORSet<?> orset) 
 - 
orsetFromBinarypublic ORSet<java.lang.Object> orsetFromBinary(byte[] bytes) 
 - 
orsetFromProtopublic ORSet<java.lang.Object> orsetFromProto(ReplicatedDataMessages.ORSet orset) 
 - 
flagToProtopublic ReplicatedDataMessages.Flag flagToProto(Flag flag) 
 - 
flagFromBinarypublic Flag flagFromBinary(byte[] bytes) 
 - 
flagFromProtopublic Flag flagFromProto(ReplicatedDataMessages.Flag flag) 
 - 
lwwRegisterToProtopublic ReplicatedDataMessages.LWWRegister lwwRegisterToProto(LWWRegister<?> lwwRegister) 
 - 
lwwRegisterFromBinarypublic LWWRegister<java.lang.Object> lwwRegisterFromBinary(byte[] bytes) 
 - 
lwwRegisterFromProtopublic LWWRegister<java.lang.Object> lwwRegisterFromProto(ReplicatedDataMessages.LWWRegister lwwRegister) 
 - 
gcounterToProtopublic ReplicatedDataMessages.GCounter gcounterToProto(GCounter gcounter) 
 - 
gcounterFromBinarypublic GCounter gcounterFromBinary(byte[] bytes) 
 - 
gcounterFromProtopublic GCounter gcounterFromProto(ReplicatedDataMessages.GCounter gcounter) 
 - 
pncounterToProtopublic ReplicatedDataMessages.PNCounter pncounterToProto(PNCounter pncounter) 
 - 
pncounterFromBinarypublic PNCounter pncounterFromBinary(byte[] bytes) 
 - 
pncounterFromProtopublic PNCounter pncounterFromProto(ReplicatedDataMessages.PNCounter pncounter) 
 - 
ormapToProtopublic ReplicatedDataMessages.ORMap ormapToProto(ORMap<?,?> ormap) 
 - 
ormapFromBinarypublic ORMap<java.lang.Object,ReplicatedData> ormapFromBinary(byte[] bytes) 
 - 
mapTypeFromProtopublic <PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3,B extends ReplicatedData> scala.collection.immutable.Map<java.lang.Object,B> mapTypeFromProto(java.util.List<PEntry> input, scala.Function1<A,B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh) 
 - 
ormapFromProtopublic ORMap<java.lang.Object,ReplicatedData> ormapFromProto(ReplicatedDataMessages.ORMap ormap) 
 - 
singleMapEntryFromProtopublic <PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3,B extends ReplicatedData> scala.collection.immutable.Map<java.lang.Object,B> singleMapEntryFromProto(java.util.List<PEntry> input, scala.Function1<A,B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh) 
 - 
singleKeyEntryFromProtopublic <PEntry extends akka.protobufv3.internal.GeneratedMessageV3,A extends akka.protobufv3.internal.GeneratedMessageV3> java.lang.Object singleKeyEntryFromProto(scala.Option<PEntry> entryOption, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry,A> eh)
 - 
lwwmapToProtopublic ReplicatedDataMessages.LWWMap lwwmapToProto(LWWMap<?,?> lwwmap) 
 - 
lwwmapFromBinarypublic LWWMap<java.lang.Object,java.lang.Object> lwwmapFromBinary(byte[] bytes) 
 - 
lwwmapFromProtopublic LWWMap<java.lang.Object,java.lang.Object> lwwmapFromProto(ReplicatedDataMessages.LWWMap lwwmap) 
 - 
pncountermapToProtopublic ReplicatedDataMessages.PNCounterMap pncountermapToProto(PNCounterMap<?> pncountermap) 
 - 
pncountermapFromBinarypublic PNCounterMap<?> pncountermapFromBinary(byte[] bytes) 
 - 
pncountermapFromProtopublic PNCounterMap<?> pncountermapFromProto(ReplicatedDataMessages.PNCounterMap pncountermap) 
 - 
multimapToProtopublic ReplicatedDataMessages.ORMultiMap multimapToProto(ORMultiMap<?,?> multimap) 
 - 
multimapFromBinarypublic ORMultiMap<java.lang.Object,java.lang.Object> multimapFromBinary(byte[] bytes) 
 - 
multimapFromProtopublic ORMultiMap<java.lang.Object,java.lang.Object> multimapFromProto(ReplicatedDataMessages.ORMultiMap multimap) 
 - 
keyIdToBinarypublic byte[] keyIdToBinary(java.lang.String id) 
 - 
keyIdFromBinarypublic java.lang.String keyIdFromBinary(byte[] bytes) 
 
- 
 
-