Class 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 a IClusterTransmission. Some data available in the IClusterTransmission 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  
      • Fields inherited from class org.jgroups.Header

        prot_id
    • 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)  
      • Methods inherited from class org.jgroups.Header

        getProtId, setProtId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 given IClusterTransmission.
        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 class org.jgroups.Header
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.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 class org.jgroups.Header