Class ReplicatorMessageSerializer

java.lang.Object
org.apache.pekko.serialization.SerializerWithStringManifest
org.apache.pekko.cluster.ddata.protobuf.ReplicatorMessageSerializer
All Implemented Interfaces:
SerializationSupport, BaseSerializer, Serializer

public class ReplicatorMessageSerializer extends SerializerWithStringManifest implements SerializationSupport, BaseSerializer
Protobuf serializer of ReplicatorMessage messages.
  • Constructor Details

  • 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 interface BaseSerializer
      Specified by:
      identifier in interface Serializer
      Specified by:
      identifier in class SerializerWithStringManifest
    • 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 the reference.conf.

      See pekko.serialization.Serializer.identifier.

      Specified by:
      org$apache$pekko$serialization$BaseSerializer$_setter_$identifier_$eq in interface BaseSerializer
    • system

      public ExtendedActorSystem system()
      Description copied from interface: BaseSerializer
      Actor system which is required by most serializer implementations.
      Specified by:
      system in interface BaseSerializer
      Specified by:
      system in interface SerializationSupport
    • GetManifest

      public String GetManifest()
    • GetSuccessManifest

      public String GetSuccessManifest()
    • NotFoundManifest

      public String NotFoundManifest()
    • GetFailureManifest

      public String GetFailureManifest()
    • SubscribeManifest

      public String SubscribeManifest()
    • UnsubscribeManifest

      public String UnsubscribeManifest()
    • ChangedManifest

      public String ChangedManifest()
    • DataEnvelopeManifest

      public String DataEnvelopeManifest()
    • WriteManifest

      public String WriteManifest()
    • WriteAckManifest

      public String WriteAckManifest()
    • ReadManifest

      public String ReadManifest()
    • ReadResultManifest

      public String ReadResultManifest()
    • StatusManifest

      public String StatusManifest()
    • GossipManifest

      public String GossipManifest()
    • WriteNackManifest

      public String WriteNackManifest()
    • DurableDataEnvelopeManifest

      public String DurableDataEnvelopeManifest()
    • DeltaPropagationManifest

      public String DeltaPropagationManifest()
    • DeltaNackManifest

      public String DeltaNackManifest()
    • manifest

      public String manifest(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 class SerializerWithStringManifest
    • toBinary

      public byte[] toBinary(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 interface Serializer
      Specified by:
      toBinary in class SerializerWithStringManifest
    • fromBinary

      public Object fromBinary(byte[] bytes, 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 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.

      Specified by:
      fromBinary in class SerializerWithStringManifest