Package org.jgroups.protocols
Class TpHeader
java.lang.Object
org.jgroups.Header
org.jgroups.protocols.TpHeader
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
Generic transport header, used by TP.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected byteprotected intstatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]create()Creates an instance of the class implementing this interfacebyteflag()byte[]shortReturns the magic-ID.intindex()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()voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
cluster_name
protected byte[] cluster_name -
REQ
public static final byte REQ- See Also:
-
RSP
public static final byte RSP- See Also:
-
flag
protected byte flag -
index
protected int index
-
-
Constructor Details
-
TpHeader
public TpHeader() -
TpHeader
-
TpHeader
-
TpHeader
-
TpHeader
-
TpHeader
public TpHeader(byte[] n)
-
-
Method Details
-
getClusterName
public byte[] getClusterName() -
clusterName
public byte[] clusterName() -
flag
public byte flag() -
index
public int index() -
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface -
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
-
toString
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object -
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:
IOException
-