Package lumis.portal.cluster.multiserver
Class ClusterTransmissionHeader
- java.lang.Object
-
- org.jgroups.Header
-
- lumis.portal.cluster.multiserver.ClusterTransmissionHeader
-
- All Implemented Interfaces:
org.jgroups.Constructable<org.jgroups.Header>
,org.jgroups.util.SizeStreamable
,org.jgroups.util.Streamable
public class ClusterTransmissionHeader extends org.jgroups.Header
Header used to store some control information about aIClusterTransmission
. Some data available in theIClusterTransmission
is also stored in this header to prevent the need to deserialize the message to read them.- Since:
- 4.1.0
- Version:
- $Revision: 23112 $ $Date: 2019-09-06 19:00:02 -0300 (Fri, 06 Sep 2019) $
-
-
Field Summary
Fields Modifier and Type Field Description static byte
FLAG_DURABLE
Bit used to indicate durable.static byte
FLAG_TOTAL_ORDER
Bit used to indicate total order.static java.lang.String
HEADER_NAME
The name used to store this header.static short
MAGIC_ID
-
Constructor Summary
Constructors Constructor Description ClusterTransmissionHeader()
Creates a header with default values.ClusterTransmissionHeader(IClusterTransmission clusterTransmission)
Creates a header initialized according to the givenIClusterTransmission
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<? extends org.jgroups.Header>
create()
byte
getFlags()
Returns the flags set in this header.short
getMagicId()
java.lang.String
getTransmissionId()
Returns the unique identifier of the transmission for which this header belongs.long
getTransmissionOrder()
Returns the transmission order generated for the corresponding transmission.void
readFrom(java.io.DataInput in)
int
serializedSize()
int
size()
java.lang.String
toString()
void
writeTo(java.io.DataOutput out)
-
-
-
Field Detail
-
FLAG_TOTAL_ORDER
public static final byte FLAG_TOTAL_ORDER
Bit used to indicate total order.- Since:
- 4.1.0
- See Also:
getFlags()
, Constant Field Values
-
FLAG_DURABLE
public static final byte FLAG_DURABLE
Bit used to indicate durable.- Since:
- 4.1.0
- See Also:
getFlags()
, Constant Field Values
-
MAGIC_ID
public static final short MAGIC_ID
- See Also:
- Constant Field Values
-
HEADER_NAME
public static final java.lang.String HEADER_NAME
The name used to store this header.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClusterTransmissionHeader
public ClusterTransmissionHeader()
Creates a header with default values. Intended for use by deserialization process.- Since:
- 4.1.0
-
ClusterTransmissionHeader
public ClusterTransmissionHeader(IClusterTransmission clusterTransmission)
Creates a header initialized according to the givenIClusterTransmission
.- Parameters:
clusterTransmission
- the cluster message.- Since:
- 4.1.0
-
-
Method Detail
-
getTransmissionId
public java.lang.String getTransmissionId()
Returns the unique identifier of the transmission for which this header belongs.- Returns:
- the unique identifier of the transmission.
- Since:
- 4.1.0
-
getFlags
public byte getFlags()
Returns the flags set in this header.- Returns:
- a value that is an OR combination of the active FLAG_* constants.
- Since:
- 4.1.0
-
getTransmissionOrder
public long getTransmissionOrder()
Returns the transmission order generated for the corresponding transmission.- Returns:
- the transmission order generated for the corresponding transmission.
- Since:
- 4.1.0
-
size
public int size()
- Overrides:
size
in classorg.jgroups.Header
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.jgroups.Header
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
serializedSize
public int serializedSize()
-
create
public java.util.function.Supplier<? extends org.jgroups.Header> create()
-
getMagicId
public short getMagicId()
- Specified by:
getMagicId
in classorg.jgroups.Header
-
-