Package org.jgroups.protocols.pbcast
Class NakAckHeader2
java.lang.Object
org.jgroups.Header
org.jgroups.protocols.pbcast.NakAckHeader2
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
Header used by
NAKACK2-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final byte(package private) Address(package private) long(package private) bytestatic final bytestatic final byte -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNakAckHeader2(byte type, long seqno) Constructor for regular messages or XMIT responsesprivateNakAckHeader2(byte type, Address sender) Constructor for retransmit requests (XMIT_REQs) (low and high define the range of msgs) -
Method Summary
Modifier and TypeMethodDescriptioncopy()create()Creates an instance of the class implementing this interfacestatic NakAckHeader2createHighestSeqnoHeader(long seqno) static NakAckHeader2createMessageHeader(long seqno) static NakAckHeader2createXmitRequestHeader(Address orginal_sender) static NakAckHeader2shortReturns the magic-ID.longgetSeqno()bytegetType()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()static Stringtype2Str(byte t) voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
MSG
public static final byte MSG- See Also:
-
XMIT_REQ
public static final byte XMIT_REQ- See Also:
-
XMIT_RSP
public static final byte XMIT_RSP- See Also:
-
HIGHEST_SEQNO
public static final byte HIGHEST_SEQNO- See Also:
-
type
byte type -
seqno
long seqno -
sender
Address sender
-
-
Constructor Details
-
NakAckHeader2
public NakAckHeader2() -
NakAckHeader2
private NakAckHeader2(byte type, long seqno) Constructor for regular messages or XMIT responses -
NakAckHeader2
Constructor for retransmit requests (XMIT_REQs) (low and high define the range of msgs)
-
-
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 -
createMessageHeader
-
createXmitRequestHeader
-
createXmitResponseHeader
-
createHighestSeqnoHeader
-
getType
public byte getType() -
getSeqno
public long getSeqno() -
getSender
-
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 -
copy
-
type2Str
-
toString
-