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 byte
CANCEL_MERGE
static byte
GET_CURRENT_VIEW
static byte
GET_DIGEST_REQ
static byte
GET_DIGEST_RSP
static byte
INSTALL_DIGEST
static byte
INSTALL_MERGE_VIEW
static byte
INSTALL_MERGE_VIEW_OK
static byte
JOIN_REQ
static byte
JOIN_REQ_WITH_STATE_TRANSFER
static byte
JOIN_RSP
static byte
LEAVE_REQ
static byte
LEAVE_RSP
protected Address
mbr
protected MergeId
merge_id
static short
MERGE_ID_PRESENT
protected boolean
merge_rejected
static short
MERGE_REJECTED
static byte
MERGE_REQ
static byte
MERGE_RSP
protected byte
type
static short
USE_FLUSH
protected boolean
useFlushIfPresent
static byte
VIEW
static byte
VIEW_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 short
determineFlags()
short
getMagicId()
Returns the magic-ID.Address
getMember()
MergeId
getMergeId()
byte
getType()
boolean
isMergeRejected()
GMS.GmsHeader
mbr(Address mbr)
GMS.GmsHeader
mergeId(MergeId merge_id)
GMS.GmsHeader
mergeRejected(boolean flag)
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedint
serializedSize()
Returns the size (in bytes) of the marshalled objectvoid
setMergeId(MergeId merge_id)
GMS.GmsHeader
setMergeRejected(boolean merge_rejected)
java.lang.String
toString()
static java.lang.String
type2String(int type)
void
writeTo(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:Header
Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicId
in 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:Constructable
Creates an instance of the class implementing this interface
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write 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.ClassNotFoundException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object
-
determineFlags
protected short determineFlags()
-
type2String
public static java.lang.String type2String(int type)
-
-