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 class
ReplicatedDataSerializer.KeyComparator<A extends org.apache.pekko.protobufv3.internal.GeneratedMessage>
static class
static class
static class
static class
static class
static class
static class
static class
static class
static interface
ReplicatedDataSerializer.ProtoMapEntryReader<Entry extends org.apache.pekko.protobufv3.internal.GeneratedMessage,
A extends org.apache.pekko.protobufv3.internal.GeneratedMessage> static interface
ReplicatedDataSerializer.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) int
Completely 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 void
Globally 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, includeManifest
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.pekko.serialization.BaseSerializer
identifierFromConfig, SerializationIdentifiers
Methods 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, versionVectorToProto
Methods 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:SerializerWithStringManifest
Completely 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:
identifier
in interfaceBaseSerializer
- Specified by:
identifier
in interfaceSerializer
- Specified by:
identifier
in 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:BaseSerializer
Globally unique serialization identifier configured in thereference.conf
.See
pekko.serialization.Serializer.identifier
.- Specified by:
org$apache$pekko$serialization$BaseSerializer$_setter_$identifier_$eq
in interfaceBaseSerializer
-
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
-
manifest
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
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
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
-
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
-