Package org.jgroups.protocols.pbcast
Class STATE_TRANSFER.StateHeader
java.lang.Object
org.jgroups.Header
org.jgroups.protocols.pbcast.STATE_TRANSFER.StateHeader
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
- Enclosing class:
STATE_TRANSFER
Wraps data for a state request/response. Note that for a state response
the actual state will not be stored in the header itself, but in the message's buffer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Digeststatic final bytestatic final bytestatic final byteprotected byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an instance of the class implementing this interfaceshortReturns the magic-ID.intgetType()voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedintReturns the size (in bytes) of the marshalled objecttoString()(package private) static Stringtype2Str(int t) voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
STATE_REQ
public static final byte STATE_REQ- See Also:
-
STATE_RSP
public static final byte STATE_RSP- See Also:
-
STATE_EX
public static final byte STATE_EX- See Also:
-
type
protected byte type -
my_digest
-
-
Constructor Details
-
StateHeader
public StateHeader() -
StateHeader
public StateHeader(byte type) -
StateHeader
-
-
Method Details
-
getMagicId
public short getMagicId()Description copied from class:HeaderReturns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicIdin classHeader
-
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface -
getType
public int getType() -
getDigest
-
toString
-
type2Str
-
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Throws:
IOException
-
readFrom
Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
IOExceptionClassNotFoundException
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object
-