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 byte
DATA
protected Address
final_dest
static byte
HOST_UNREACHABLE
protected Address
original_sender
static byte
SITE_UNREACHABLE
protected java.lang.String[]
sites
static byte
SITES_DOWN
static byte
SITES_UP
static byte
TOPO_REQ
static byte
TOPO_RSP
protected byte
type
-
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 interfaceAddress
getFinalDest()
short
getMagicId()
Returns the magic-ID.Address
getOriginalSender()
java.lang.String[]
getSites()
byte
getType()
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedint
serializedSize()
Returns the size (in bytes) of the marshalled objectRELAY2.Relay2Header
setSites(java.lang.String... s)
protected static int
sizeOf(java.lang.String[] arr)
java.lang.String
toString()
protected static java.lang.String
typeToString(byte type)
void
writeTo(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:Header
Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicId
in classHeader
-
create
public java.util.function.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()
-
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:SizeStreamable
Returns the size (in bytes) of the marshalled object
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.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:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.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:
java.io.IOException
java.lang.ClassNotFoundException
-
typeToString
protected static java.lang.String typeToString(byte type)
-
sizeOf
protected static int sizeOf(java.lang.String[] arr)
-
-