Class RequestCorrelator.Header

java.lang.Object
org.jgroups.Header
org.jgroups.blocks.RequestCorrelator.Header
All Implemented Interfaces:
Constructable<Header>, SizeStreamable, Streamable
Direct Known Subclasses:
RequestCorrelator.MultiDestinationHeader
Enclosing class:
RequestCorrelator

public static class RequestCorrelator.Header extends Header
  • Field Details

    • REQ

      public static final byte REQ
      See Also:
    • RSP

      public static final byte RSP
      See Also:
    • EXC_RSP

      public static final byte EXC_RSP
      See Also:
    • type

      public byte type
      Type of header: request or reply
    • req_id

      public long req_id
      The request id (unique for each blocking request), 0 means no response is expected
    • corrId

      public short corrId
      The unique ID of the associated RequestCorrelator
  • Constructor Details

    • Header

      public Header()
    • Header

      public Header(byte type, long req_id, short corr_id)
      Parameters:
      type - type of header (REQ/RSP)
      req_id - id of this header relative to ids of other requests originating from the same correlator
      corr_id - The ID of the RequestCorrelator from which
  • Method Details

    • requestId

      public RequestCorrelator.Header requestId(long req_id)
    • 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
    • requestId

      public long requestId()
    • rspExpected

      public boolean rspExpected()
    • corrId

      public short corrId()
    • toString

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

      public void writeTo(DataOutput out) throws 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:
      IOException
    • readFrom

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

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