Package org.jgroups.blocks
Class RequestCorrelator.Header
java.lang.Object
org.jgroups.Header
org.jgroups.blocks.RequestCorrelator.Header
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
- Direct Known Subclasses:
RequestCorrelator.MultiDestinationHeader
- Enclosing class:
RequestCorrelator
-
Field Summary
FieldsModifier and TypeFieldDescriptionshortThe unique ID of the associated RequestCorrelatorstatic final bytestatic final bytelongThe request id (unique for each blocking request), 0 means no response is expectedstatic final bytebyteType of header: request or reply -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortcorrId()create()Creates an instance of the class implementing this interfaceshortReturns the magic-ID.voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedlongrequestId(long req_id) booleanintReturns 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
-
REQ
public static final byte REQ- See Also:
-
RSP
public static final byte RSP- See Also:
-
EXC_RSP
public static final byte EXC_RSP- See Also:
-
type
public byte typeType of header: request or reply -
req_id
public long req_idThe request id (unique for each blocking request), 0 means no response is expected -
corrId
public short corrIdThe unique ID of the associated RequestCorrelator
-
-
Constructor Details
-
Header
public Header() -
Header
public Header(byte type, long req_id, short corr_id) - Parameters:
type- type of header (REQ/RSP)req_id- id of this header relative to ids of other requests originating from the same correlatorcorr_id- The ID of the RequestCorrelator from which
-
-
Method Details
-
requestId
-
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 -
requestId
public long requestId() -
rspExpected
public boolean rspExpected() -
corrId
public short corrId() -
toString
-
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
-