Package akka.cluster.protobuf
Class ClusterMessageSerializer
- java.lang.Object
-
- akka.serialization.SerializerWithStringManifest
-
- akka.cluster.protobuf.ClusterMessageSerializer
-
- All Implemented Interfaces:
BaseSerializer
,Serializer
public final class ClusterMessageSerializer extends SerializerWithStringManifest implements BaseSerializer
Protobuf serializer of cluster messages.
-
-
Constructor Summary
Constructors Constructor Description ClusterMessageSerializer(ExtendedActorSystem system)
-
Method Summary
All Methods Static 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
.static java.lang.String
ClusterRouterPoolManifest()
byte[]
compress(akka.protobufv3.internal.MessageLite msg)
byte[]
decompress(byte[] bytes)
ClusterRouterPool
deserializeClusterRouterPool(byte[] bytes)
akka.cluster.ClusterHeartbeatSender.Heartbeat
deserializeHeartBeat(byte[] bytes)
akka.cluster.ClusterHeartbeatSender.HeartbeatRsp
deserializeHeartBeatResponse(byte[] bytes)
static java.lang.String
DownManifest()
static java.lang.String
ExitingConfirmedManifest()
java.lang.Object
fromBinary(byte[] bytes, java.lang.String manifest)
Produces an object from an array of bytes, with an optional type-hint.static java.lang.String
GossipEnvelopeManifest()
static java.lang.String
GossipStatusManifest()
static java.lang.String
HeartbeatManifest()
static java.lang.String
HeartBeatManifestPre2523()
static java.lang.String
HeartbeatRspManifest()
static java.lang.String
HeartBeatRspManifest2523()
int
identifier()
Completely unique value to identify this implementation of Serializer, used to optimize network traffic.static java.lang.String
InitJoinAckManifest()
static java.lang.String
InitJoinManifest()
static java.lang.String
InitJoinNackManifest()
static java.lang.String
JoinManifest()
static java.lang.String
LeaveManifest()
java.lang.String
manifest(java.lang.Object o)
Return the manifest (type hint) that will be provided in the fromBinary method.static java.lang.String
OldClusterRouterPoolManifest()
static java.lang.String
OldDownManifest()
static java.lang.String
OldExitingConfirmedManifest()
static java.lang.String
OldGossipEnvelopeManifest()
static java.lang.String
OldGossipStatusManifest()
static java.lang.String
OldInitJoinAckManifest()
static java.lang.String
OldInitJoinManifest()
static java.lang.String
OldInitJoinNackManifest()
static java.lang.String
OldJoinManifest()
static java.lang.String
OldLeaveManifest()
static java.lang.String
OldWelcomeManifest()
static java.lang.String
PrepareForShutdownManifest()
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.static java.lang.String
WelcomeManifest()
-
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.serialization.Serializer
fromBinary, fromBinary, fromBinary, includeManifest
-
-
-
-
Constructor Detail
-
ClusterMessageSerializer
public ClusterMessageSerializer(ExtendedActorSystem system)
-
-
Method Detail
-
OldJoinManifest
public static java.lang.String OldJoinManifest()
-
OldWelcomeManifest
public static java.lang.String OldWelcomeManifest()
-
OldLeaveManifest
public static java.lang.String OldLeaveManifest()
-
OldDownManifest
public static java.lang.String OldDownManifest()
-
OldInitJoinManifest
public static java.lang.String OldInitJoinManifest()
-
OldInitJoinAckManifest
public static java.lang.String OldInitJoinAckManifest()
-
OldInitJoinNackManifest
public static java.lang.String OldInitJoinNackManifest()
-
HeartBeatManifestPre2523
public static java.lang.String HeartBeatManifestPre2523()
-
HeartBeatRspManifest2523
public static java.lang.String HeartBeatRspManifest2523()
-
OldExitingConfirmedManifest
public static java.lang.String OldExitingConfirmedManifest()
-
OldGossipStatusManifest
public static java.lang.String OldGossipStatusManifest()
-
OldGossipEnvelopeManifest
public static java.lang.String OldGossipEnvelopeManifest()
-
OldClusterRouterPoolManifest
public static java.lang.String OldClusterRouterPoolManifest()
-
JoinManifest
public static java.lang.String JoinManifest()
-
WelcomeManifest
public static java.lang.String WelcomeManifest()
-
LeaveManifest
public static java.lang.String LeaveManifest()
-
DownManifest
public static java.lang.String DownManifest()
-
PrepareForShutdownManifest
public static java.lang.String PrepareForShutdownManifest()
-
InitJoinManifest
public static java.lang.String InitJoinManifest()
-
InitJoinAckManifest
public static java.lang.String InitJoinAckManifest()
-
InitJoinNackManifest
public static java.lang.String InitJoinNackManifest()
-
HeartbeatManifest
public static java.lang.String HeartbeatManifest()
-
HeartbeatRspManifest
public static java.lang.String HeartbeatRspManifest()
-
ExitingConfirmedManifest
public static java.lang.String ExitingConfirmedManifest()
-
GossipStatusManifest
public static java.lang.String GossipStatusManifest()
-
GossipEnvelopeManifest
public static java.lang.String GossipEnvelopeManifest()
-
ClusterRouterPoolManifest
public static java.lang.String ClusterRouterPoolManifest()
-
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
-
manifest
public java.lang.String manifest(java.lang.Object o)
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
-
compress
public byte[] compress(akka.protobufv3.internal.MessageLite msg)
-
decompress
public byte[] decompress(byte[] bytes)
-
deserializeHeartBeat
public akka.cluster.ClusterHeartbeatSender.Heartbeat deserializeHeartBeat(byte[] bytes)
-
deserializeHeartBeatResponse
public akka.cluster.ClusterHeartbeatSender.HeartbeatRsp deserializeHeartBeatResponse(byte[] bytes)
-
deserializeClusterRouterPool
public ClusterRouterPool deserializeClusterRouterPool(byte[] bytes)
-
-