Package org.jgroups.protocols
Class PingData
- java.lang.Object
-
- org.jgroups.protocols.PingData
-
- All Implemented Interfaces:
Constructable<PingData>
,SizeStreamable
,Streamable
public class PingData extends java.lang.Object implements SizeStreamable, Constructable<PingData>
Encapsulates information about a cluster node, e.g. local address, coordinator's address, logical name and physical address(es)- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected byte
flags
protected static byte
is_coord
protected static byte
is_server
protected java.lang.String
logical_name
protected java.util.Collection<? extends Address>
mbrs
protected PhysicalAddress
physical_addr
protected Address
sender
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PingData
coord(boolean c)
java.util.function.Supplier<? extends PingData>
create()
Creates an instance of the class implementing this interfaceboolean
equals(java.lang.Object obj)
Address
getAddress()
java.lang.String
getLogicalName()
PhysicalAddress
getPhysicalAddr()
Address
getSender()
int
hashCode()
boolean
isCoord()
boolean
isServer()
java.util.Collection<? extends Address>
mbrs()
PingData
mbrs(java.util.Collection<? extends Address> mbrs)
void
readFrom(java.io.DataInput instream)
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 objectPingData
server(boolean c)
java.lang.String
toString()
void
writeTo(java.io.DataOutput outstream)
Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
sender
protected Address sender
-
flags
protected byte flags
-
logical_name
protected java.lang.String logical_name
-
physical_addr
protected PhysicalAddress physical_addr
-
mbrs
protected java.util.Collection<? extends Address> mbrs
-
is_server
protected static final byte is_server
- See Also:
- Constant Field Values
-
is_coord
protected static final byte is_coord
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PingData
public PingData()
-
PingData
public PingData(Address sender, boolean is_server)
-
PingData
public PingData(Address sender, boolean is_server, java.lang.String logical_name, PhysicalAddress physical_addr)
-
-
Method Detail
-
create
public java.util.function.Supplier<? extends PingData> create()
Description copied from interface:Constructable
Creates an instance of the class implementing this interface- Specified by:
create
in interfaceConstructable<PingData>
-
coord
public PingData coord(boolean c)
-
server
public PingData server(boolean c)
-
isCoord
public boolean isCoord()
-
isServer
public boolean isServer()
-
getSender
public Address getSender()
-
getAddress
public Address getAddress()
-
getLogicalName
public java.lang.String getLogicalName()
-
getPhysicalAddr
public PhysicalAddress getPhysicalAddr()
-
mbrs
public java.util.Collection<? extends Address> mbrs()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object- Specified by:
serializedSize
in interfaceSizeStreamable
-
writeTo
public void writeTo(java.io.DataOutput outstream) 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- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput instream) 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- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-