public class ClusterSingletonMessageSerializer extends SerializerWithStringManifest implements BaseSerializer
| Constructor and Description |
|---|
ClusterSingletonMessageSerializer(ExtendedActorSystem system) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
fromBinary(byte[] bytes,
java.lang.String manifest)
Produces an object from an array of bytes, with an optional type-hint;
the class should be loaded using ActorSystem.dynamicAccess.
|
int |
identifier()
Completely unique value to identify this implementation of Serializer, used to optimize network traffic.
|
java.lang.String |
manifest(java.lang.Object obj)
Return the manifest (type hint) that will be provided in the fromBinary method.
|
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
|
fromBinary, includeManifestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitidentifierFromConfig, SerializationIdentifiersfromBinary, fromBinary, fromBinary, includeManifestpublic ClusterSingletonMessageSerializer(ExtendedActorSystem system)
public int identifier()
SerializerWithStringManifestidentifier in interface BaseSerializeridentifier in interface Serializeridentifier in class SerializerWithStringManifestpublic ExtendedActorSystem system()
BaseSerializersystem in interface BaseSerializerpublic java.lang.String manifest(java.lang.Object obj)
SerializerWithStringManifest"" if manifest is not needed.manifest in class SerializerWithStringManifestobj - (undocumented)public byte[] toBinary(java.lang.Object obj)
SerializerWithStringManifesttoBinary in interface SerializertoBinary in class SerializerWithStringManifestobj - (undocumented)public java.lang.Object fromBinary(byte[] bytes,
java.lang.String manifest)
SerializerWithStringManifest
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.
fromBinary in class SerializerWithStringManifestbytes - (undocumented)manifest - (undocumented)