Class RelayHeader

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

public class RelayHeader extends Header
Header for RELAY2 and RELAY3
Since:
5.2.15
  • Field Details

    • DATA

      public static final byte DATA
      See Also:
    • SITE_UNREACHABLE

      public static final byte SITE_UNREACHABLE
      See Also:
    • MBR_UNREACHABLE

      public static final byte MBR_UNREACHABLE
      See Also:
    • SITES_UP

      public static final byte SITES_UP
      See Also:
    • SITES_DOWN

      public static final byte SITES_DOWN
      See Also:
    • TOPO_REQ

      public static final byte TOPO_REQ
      See Also:
    • TOPO_RSP

      public static final byte TOPO_RSP
      See Also:
    • type

      protected byte type
    • final_dest

      protected Address final_dest
    • original_sender

      protected Address original_sender
    • sites

      protected Set<String> sites
    • visited_sites

      protected Set<String> visited_sites
    • return_entire_cache

      protected boolean return_entire_cache
    • original_hdrs

      protected Header[] original_hdrs
    • original_flags

      protected short original_flags
  • Constructor Details

    • RelayHeader

      public RelayHeader()
    • RelayHeader

      public RelayHeader(byte type)
    • RelayHeader

      public RelayHeader(byte type, Address final_dest, Address original_sender)
  • 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
    • getType

      public byte getType()
    • getFinalDest

      public Address getFinalDest()
    • setFinalDestination

      public RelayHeader setFinalDestination(Address d)
    • getOriginalSender

      public Address getOriginalSender()
    • setOriginalSender

      public RelayHeader setOriginalSender(Address s)
    • getSites

      public Set<String> getSites()
    • hasSites

      public boolean hasSites()
    • returnEntireCache

      public boolean returnEntireCache()
    • returnEntireCache

      public RelayHeader returnEntireCache(boolean b)
    • originalHeaders

      public Header[] originalHeaders()
    • originalHeaders

      public RelayHeader originalHeaders(Header[] hdrs)
    • originalFlags

      public short originalFlags()
    • originalFlags

      public RelayHeader originalFlags(short fl)
    • getSite

      public String getSite()
    • addToSites

      public RelayHeader addToSites(Collection<String> s)
    • addToSites

      public RelayHeader addToSites(String... s)
    • addToVisitedSites

      public RelayHeader addToVisitedSites(String s)
    • addToVisitedSites

      public RelayHeader addToVisitedSites(Collection<String> list)
    • hasVisitedSites

      public boolean hasVisitedSites()
    • getVisitedSites

      public Set<String> getVisitedSites()
    • copy

      public RelayHeader copy()
    • serializedSize

      public int serializedSize()
      Description copied from interface: SizeStreamable
      Returns the size (in bytes) of the marshalled object
    • 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
    • toString

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

      protected static String typeToString(byte type)
    • sizeOf

      protected static int sizeOf(Collection<String> list)
    • assertNonNullSites

      protected void assertNonNullSites()