Package org.jgroups.protocols.relay
Class RELAY2.Relay2Header
- java.lang.Object
-
- org.jgroups.Header
-
- org.jgroups.protocols.relay.RELAY2.Relay2Header
-
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
- Enclosing class:
- RELAY2
public static class RELAY2.Relay2Header extends Header
-
-
Field Summary
Fields Modifier and Type Field Description static byteDATAprotected Addressfinal_deststatic byteHOST_UNREACHABLEprotected Addressoriginal_senderstatic byteSITE_UNREACHABLEprotected java.lang.String[]sitesstatic byteSITES_DOWNstatic byteSITES_UPstatic byteTOPO_REQstatic byteTOPO_RSPprotected bytetype
-
Constructor Summary
Constructors Constructor Description Relay2Header()Relay2Header(byte type)Relay2Header(byte type, Address final_dest, Address original_sender)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<? extends Header>create()Creates an instance of the class implementing this interfaceAddressgetFinalDest()shortgetMagicId()Returns the magic-ID.AddressgetOriginalSender()java.lang.String[]getSites()bytegetType()voidreadFrom(java.io.DataInput in)Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedintserializedSize()Returns the size (in bytes) of the marshalled objectRELAY2.Relay2HeadersetSites(java.lang.String... s)protected static intsizeOf(java.lang.String[] arr)java.lang.StringtoString()protected static java.lang.StringtypeToString(byte type)voidwriteTo(java.io.DataOutput out)Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
DATA
public static final byte DATA
- See Also:
- Constant Field Values
-
SITE_UNREACHABLE
public static final byte SITE_UNREACHABLE
- See Also:
- Constant Field Values
-
HOST_UNREACHABLE
public static final byte HOST_UNREACHABLE
- See Also:
- Constant Field Values
-
SITES_UP
public static final byte SITES_UP
- See Also:
- Constant Field Values
-
SITES_DOWN
public static final byte SITES_DOWN
- See Also:
- Constant Field Values
-
TOPO_REQ
public static final byte TOPO_REQ
- See Also:
- Constant Field Values
-
TOPO_RSP
public static final byte TOPO_RSP
- See Also:
- Constant Field Values
-
type
protected byte type
-
final_dest
protected Address final_dest
-
original_sender
protected Address original_sender
-
sites
protected java.lang.String[] sites
-
-
Method Detail
-
getMagicId
public short getMagicId()
Description copied from class:HeaderReturns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicIdin classHeader
-
create
public java.util.function.Supplier<? extends Header> create()
Description copied from interface:ConstructableCreates an instance of the class implementing this interface
-
getType
public byte getType()
-
getFinalDest
public Address getFinalDest()
-
getOriginalSender
public Address getOriginalSender()
-
setSites
public RELAY2.Relay2Header setSites(java.lang.String... s)
-
getSites
public java.lang.String[] getSites()
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionDescription copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
typeToString
protected static java.lang.String typeToString(byte type)
-
sizeOf
protected static int sizeOf(java.lang.String[] arr)
-
-