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
public static class GMS.GmsHeader extends Header
-
-
Field Summary
Fields Modifier and Type Field Description static byteCANCEL_MERGEstatic byteGET_CURRENT_VIEWstatic byteGET_DIGEST_REQstatic byteGET_DIGEST_RSPstatic byteINSTALL_DIGESTstatic byteINSTALL_MERGE_VIEWstatic byteINSTALL_MERGE_VIEW_OKstatic byteJOIN_REQstatic byteJOIN_REQ_WITH_STATE_TRANSFERstatic byteJOIN_RSPstatic byteLEAVE_REQstatic byteLEAVE_RSPprotected Addressmbrprotected MergeIdmerge_idstatic shortMERGE_ID_PRESENTprotected booleanmerge_rejectedstatic shortMERGE_REJECTEDstatic byteMERGE_REQstatic byteMERGE_RSPprotected bytetypestatic shortUSE_FLUSHprotected booleanuseFlushIfPresentstatic byteVIEWstatic byteVIEW_ACK
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<? extends Header>create()Creates an instance of the class implementing this interfaceprotected shortdetermineFlags()shortgetMagicId()Returns the magic-ID.AddressgetMember()MergeIdgetMergeId()bytegetType()booleanisMergeRejected()GMS.GmsHeadermbr(Address mbr)GMS.GmsHeadermergeId(MergeId merge_id)GMS.GmsHeadermergeRejected(boolean flag)voidreadFrom(java.io.DataInput in)Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedintserializedSize()Returns the size (in bytes) of the marshalled objectvoidsetMergeId(MergeId merge_id)GMS.GmsHeadersetMergeRejected(boolean merge_rejected)java.lang.StringtoString()static java.lang.Stringtype2String(int type)voidwriteTo(java.io.DataOutput out)Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
JOIN_REQ
public static final byte JOIN_REQ
- See Also:
- Constant Field Values
-
JOIN_RSP
public static final byte JOIN_RSP
- See Also:
- Constant Field Values
-
LEAVE_REQ
public static final byte LEAVE_REQ
- See Also:
- Constant Field Values
-
LEAVE_RSP
public static final byte LEAVE_RSP
- See Also:
- Constant Field Values
-
VIEW
public static final byte VIEW
- See Also:
- Constant Field Values
-
MERGE_REQ
public static final byte MERGE_REQ
- See Also:
- Constant Field Values
-
MERGE_RSP
public static final byte MERGE_RSP
- See Also:
- Constant Field Values
-
INSTALL_MERGE_VIEW
public static final byte INSTALL_MERGE_VIEW
- See Also:
- Constant Field Values
-
CANCEL_MERGE
public static final byte CANCEL_MERGE
- See Also:
- Constant Field Values
-
VIEW_ACK
public static final byte VIEW_ACK
- See Also:
- Constant Field Values
-
JOIN_REQ_WITH_STATE_TRANSFER
public static final byte JOIN_REQ_WITH_STATE_TRANSFER
- See Also:
- Constant Field Values
-
INSTALL_MERGE_VIEW_OK
public static final byte INSTALL_MERGE_VIEW_OK
- See Also:
- Constant Field Values
-
GET_DIGEST_REQ
public static final byte GET_DIGEST_REQ
- See Also:
- Constant Field Values
-
GET_DIGEST_RSP
public static final byte GET_DIGEST_RSP
- See Also:
- Constant Field Values
-
INSTALL_DIGEST
public static final byte INSTALL_DIGEST
- See Also:
- Constant Field Values
-
GET_CURRENT_VIEW
public static final byte GET_CURRENT_VIEW
- See Also:
- Constant Field Values
-
MERGE_ID_PRESENT
public static final short MERGE_ID_PRESENT
- See Also:
- Constant Field Values
-
USE_FLUSH
public static final short USE_FLUSH
- See Also:
- Constant Field Values
-
MERGE_REJECTED
public static final short MERGE_REJECTED
- See Also:
- Constant Field Values
-
type
protected byte type
-
mbr
protected Address mbr
-
merge_id
protected MergeId merge_id
-
useFlushIfPresent
protected boolean useFlushIfPresent
-
merge_rejected
protected boolean merge_rejected
-
-
Method Detail
-
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
public GMS.GmsHeader mbr(Address mbr)
-
mergeId
public GMS.GmsHeader mergeId(MergeId merge_id)
-
mergeRejected
public GMS.GmsHeader mergeRejected(boolean flag)
-
getMember
public Address getMember()
-
getMergeId
public MergeId getMergeId()
-
setMergeId
public void setMergeId(MergeId merge_id)
-
isMergeRejected
public boolean isMergeRejected()
-
setMergeRejected
public GMS.GmsHeader setMergeRejected(boolean merge_rejected)
-
create
public java.util.function.Supplier<? extends Header> create()
Description copied from interface:ConstructableCreates an instance of the class implementing this interface
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionDescription copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object
-
determineFlags
protected short determineFlags()
-
type2String
public static java.lang.String type2String(int type)
-
-