Package org.jgroups.protocols.pbcast
Class GMS.GmsHeader
java.lang.Object
org.jgroups.Header
org.jgroups.protocols.pbcast.GMS.GmsHeader
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
- Enclosing class:
GMS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byteprotected Addressprotected MergeIdstatic final shortprotected booleanstatic final shortstatic final bytestatic final byteprotected bytestatic final shortprotected booleanstatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates an instance of the class implementing this interfaceprotected shortshortReturns the magic-ID.bytegetType()booleanmergeRejected(boolean flag) 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 objectsetMergeId(MergeId merge_id) setMergeRejected(boolean merge_rejected) toString()static Stringtype2String(int type) voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
JOIN_REQ
public static final byte JOIN_REQ- See Also:
-
JOIN_RSP
public static final byte JOIN_RSP- See Also:
-
LEAVE_REQ
public static final byte LEAVE_REQ- See Also:
-
LEAVE_RSP
public static final byte LEAVE_RSP- See Also:
-
VIEW
public static final byte VIEW- See Also:
-
MERGE_REQ
public static final byte MERGE_REQ- See Also:
-
MERGE_RSP
public static final byte MERGE_RSP- See Also:
-
INSTALL_MERGE_VIEW
public static final byte INSTALL_MERGE_VIEW- See Also:
-
CANCEL_MERGE
public static final byte CANCEL_MERGE- See Also:
-
VIEW_ACK
public static final byte VIEW_ACK- See Also:
-
JOIN_REQ_WITH_STATE_TRANSFER
public static final byte JOIN_REQ_WITH_STATE_TRANSFER- See Also:
-
INSTALL_MERGE_VIEW_OK
public static final byte INSTALL_MERGE_VIEW_OK- See Also:
-
GET_DIGEST_REQ
public static final byte GET_DIGEST_REQ- See Also:
-
GET_DIGEST_RSP
public static final byte GET_DIGEST_RSP- See Also:
-
INSTALL_DIGEST
public static final byte INSTALL_DIGEST- See Also:
-
GET_CURRENT_VIEW
public static final byte GET_CURRENT_VIEW- See Also:
-
MERGE_ID_PRESENT
public static final short MERGE_ID_PRESENT- See Also:
-
USE_FLUSH
public static final short USE_FLUSH- See Also:
-
MERGE_REJECTED
public static final short MERGE_REJECTED- See Also:
-
type
protected byte type -
mbr
-
merge_id
-
useFlushIfPresent
protected boolean useFlushIfPresent -
merge_rejected
protected boolean merge_rejected
-
-
Constructor Details
-
GmsHeader
public GmsHeader() -
GmsHeader
public GmsHeader(byte type) -
GmsHeader
Used for JOIN_REQ or LEAVE_REQ header -
GmsHeader
-
-
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
-
getType
public byte getType() -
mbr
-
mergeId
-
mergeRejected
-
getMember
-
getMergeId
-
setMergeId
-
isMergeRejected
public boolean isMergeRejected() -
setMergeRejected
-
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface -
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 -
determineFlags
protected short determineFlags() -
toString
-
type2String
-