Class UnicastHeader3

java.lang.Object
org.jgroups.Header
org.jgroups.protocols.UnicastHeader3
All Implemented Interfaces:
Constructable<Header>, SizeStreamable, Streamable

public class UnicastHeader3 extends Header
Moved out of UNICAST3 into separate class. Used to attach/remove headers (e.g. seqnos) from UNICAST3.
Since:
4.0
  • Field Details

  • Constructor Details

    • UnicastHeader3

      public UnicastHeader3()
    • UnicastHeader3

      protected UnicastHeader3(byte type)
    • UnicastHeader3

      protected UnicastHeader3(byte type, long seqno)
    • UnicastHeader3

      protected UnicastHeader3(byte type, long seqno, short conn_id, boolean first)
  • Method Details

    • 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 class Header
    • create

      public Supplier<? extends Header> create()
      Description copied from interface: Constructable
      Creates an instance of the class implementing this interface
    • createDataHeader

      public static UnicastHeader3 createDataHeader(long seqno, short conn_id, boolean first)
    • createAckHeader

      public static UnicastHeader3 createAckHeader(long seqno, short conn_id, int timestamp)
    • createSendFirstSeqnoHeader

      public static UnicastHeader3 createSendFirstSeqnoHeader(int timestamp)
    • createXmitReqHeader

      public static UnicastHeader3 createXmitReqHeader()
    • createCloseHeader

      public static UnicastHeader3 createCloseHeader(short conn_id)
    • type

      public byte type()
    • seqno

      public long seqno()
    • connId

      public short connId()
    • first

      public boolean first()
    • timestamp

      public int timestamp()
    • timestamp

      public UnicastHeader3 timestamp(int ts)
    • toString

      public String toString()
      Overrides:
      toString in class Header
    • type2Str

      public static String type2Str(byte t)
    • serializedSize

      public final int serializedSize()
      Description copied from interface: SizeStreamable
      Returns the size (in bytes) of the marshalled object
    • copy

      public UnicastHeader3 copy()
    • writeTo

      public void writeTo(DataOutput out) throws IOException
      The following types and fields are serialized:
       | DATA | seqno | conn_id | first |
       | ACK  | seqno | timestamp |
       | SEND_FIRST_SEQNO | timestamp |
       | CLOSE | conn_id |
       
      Throws:
      IOException
    • readFrom

      public void readFrom(DataInput in) throws IOException
      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:
      IOException