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 byteflagsprotected static byteis_coordprotected static byteis_serverprotected java.lang.Stringlogical_nameprotected java.util.Collection<? extends Address>mbrsprotected PhysicalAddressphysical_addrprotected Addresssender
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PingDatacoord(boolean c)java.util.function.Supplier<? extends PingData>create()Creates an instance of the class implementing this interfacebooleanequals(java.lang.Object obj)AddressgetAddress()java.lang.StringgetLogicalName()PhysicalAddressgetPhysicalAddr()inthashCode()booleanisCoord()booleanisServer()java.util.Collection<? extends Address>mbrs()PingDatambrs(java.util.Collection<? extends Address> mbrs)voidreadFrom(java.io.DataInput instream)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 objectPingDataserver(boolean c)java.lang.StringtoString()voidwriteTo(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:ConstructableCreates an instance of the class implementing this interface- Specified by:
createin interfaceConstructable<PingData>
-
coord
public PingData coord(boolean c)
-
server
public PingData server(boolean c)
-
isCoord
public boolean isCoord()
-
isServer
public boolean isServer()
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
public void writeTo(java.io.DataOutput outstream) 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- Specified by:
writeToin interfaceStreamable- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput instream) 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- Specified by:
readFromin interfaceStreamable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-