Class ReplicatedDataSerializer
java.lang.Object
org.apache.pekko.serialization.SerializerWithStringManifest
org.apache.pekko.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
Nested ClassesModifier and TypeClassDescriptionstatic classReplicatedDataSerializer.KeyComparator<A extends org.apache.pekko.protobufv3.internal.GeneratedMessage>static classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic interfaceReplicatedDataSerializer.ProtoMapEntryReader<Entry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage> static interfaceReplicatedDataSerializer.ProtoMapEntryWriter<Entry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,EntryBuilder extends org.apache.pekko.protobufv3.internal.GeneratedMessage.Builder<EntryBuilder>, Value extends org.apache.pekko.protobufv3.internal.GeneratedMessage> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionflagFromBinary(byte[] bytes) flagToProto(Flag flag) fromBinary(byte[] bytes, String manifest) Produces an object from an array of bytes, with an optional type-hint.gcounterFromBinary(byte[] bytes) gcounterToProto(GCounter gcounter) GSet<?>gsetFromBinary(byte[] bytes) gsetToProto(GSet<?> gset) intCompletely unique value to identify this implementation of Serializer, used to optimize network traffic.keyIdFromBinary(byte[] bytes) byte[]keyIdToBinary(String id) lwwmapFromBinary(byte[] bytes) lwwmapToProto(LWWMap<?, ?> lwwmap) lwwRegisterFromBinary(byte[] bytes) lwwRegisterFromProto(ReplicatedDataMessages.LWWRegister lwwRegister) lwwRegisterToProto(LWWRegister<?> lwwRegister) Return the manifest (type hint) that will be provided in the fromBinary method.<PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage, B extends ReplicatedData>
scala.collection.immutable.Map<Object,B> mapTypeFromProto(List<PEntry> input, scala.Function1<A, B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) multimapFromBinary(byte[] bytes) multimapToProto(ORMultiMap<?, ?> multimap) protected voidGlobally unique serialization identifier configured in thereference.conf.ormapFromBinary(byte[] bytes) ormapToProto(ORMap<?, ?> ormap) orsetFromBinary(byte[] bytes) orsetToProto(ORSet<?> orset) pncounterFromBinary(byte[] bytes) PNCounterMap<?>pncountermapFromBinary(byte[] bytes) PNCounterMap<?>pncountermapFromProto(ReplicatedDataMessages.PNCounterMap pncountermap) pncountermapToProto(PNCounterMap<?> pncountermap) pncounterToProto(PNCounter pncounter) <PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage>
ObjectsingleKeyEntryFromProto(scala.Option<PEntry> entryOption, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) <PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage, B extends ReplicatedData>
scala.collection.immutable.Map<Object,B> singleMapEntryFromProto(List<PEntry> input, scala.Function1<A, B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) system()Actor system which is required by most serializer implementations.byte[]Serializes the given object into an Array of Byte.Methods inherited from class org.apache.pekko.serialization.SerializerWithStringManifest
fromBinary, includeManifestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.serialization.BaseSerializer
identifierFromConfig, SerializationIdentifiersMethods inherited from interface org.apache.pekko.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, versionVectorToProtoMethods inherited from interface org.apache.pekko.serialization.Serializer
fromBinary, fromBinary, fromBinary, includeManifest
-
Constructor Details
-
ReplicatedDataSerializer
-
-
Method Details
-
identifier
public 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 Pekko internal usage.- Specified by:
identifierin interfaceBaseSerializer- Specified by:
identifierin interfaceSerializer- Specified by:
identifierin classSerializerWithStringManifest
-
org$apache$pekko$serialization$BaseSerializer$_setter_$identifier_$eq
protected void org$apache$pekko$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1) Description copied from interface:BaseSerializerGlobally unique serialization identifier configured in thereference.conf.See
pekko.serialization.Serializer.identifier.- Specified by:
org$apache$pekko$serialization$BaseSerializer$_setter_$identifier_$eqin interfaceBaseSerializer
-
system
Description copied from interface:BaseSerializerActor system which is required by most serializer implementations.- Specified by:
systemin interfaceBaseSerializer- Specified by:
systemin interfaceSerializationSupport
-
manifest
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 classSerializerWithStringManifest
-
toBinary
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 interfaceSerializer- Specified by:
toBinaryin classSerializerWithStringManifest
-
fromBinary
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 classSerializerWithStringManifest
-
gsetToProto
-
gsetFromBinary
-
gsetFromProto
-
orsetToProto
-
orsetFromBinary
-
orsetFromProto
-
flagToProto
-
flagFromBinary
-
flagFromProto
-
lwwRegisterToProto
-
lwwRegisterFromBinary
-
lwwRegisterFromProto
-
gcounterToProto
-
gcounterFromBinary
-
gcounterFromProto
-
pncounterToProto
-
pncounterFromBinary
-
pncounterFromProto
-
ormapToProto
-
ormapFromBinary
-
mapTypeFromProto
public <PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage, scala.collection.immutable.Map<Object,B extends ReplicatedData> B> mapTypeFromProto(List<PEntry> input, scala.Function1<A, B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) -
ormapFromProto
-
singleMapEntryFromProto
public <PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage, scala.collection.immutable.Map<Object,B extends ReplicatedData> B> singleMapEntryFromProto(List<PEntry> input, scala.Function1<A, B> valueCreator, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) -
singleKeyEntryFromProto
public <PEntry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,A extends org.apache.pekko.protobufv3.internal.GeneratedMessage> Object singleKeyEntryFromProto(scala.Option<PEntry> entryOption, ReplicatedDataSerializer.ProtoMapEntryReader<PEntry, A> eh) -
lwwmapToProto
-
lwwmapFromBinary
-
lwwmapFromProto
-
pncountermapToProto
-
pncountermapFromBinary
-
pncountermapFromProto
-
multimapToProto
-
multimapFromBinary
-
multimapFromProto
-
keyIdToBinary
-
keyIdFromBinary
-