Package org.jgroups.protocols
Class PingData
java.lang.Object
org.jgroups.protocols.PingData
- All Implemented Interfaces:
Constructable<PingData>,SizeStreamable,Streamable
Encapsulates information about a cluster node, e.g. local address, coordinator's address, logical name and
physical address(es)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byteprotected static final byteprotected static final byteprotected Stringprotected Collection<? extends Address> protected PhysicalAddressprotected Address -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncoord(boolean c) create()Creates an instance of the class implementing this interfacebooleaninthashCode()booleanisCoord()booleanisServer()Collection<? extends Address> mbrs()mbrs(Collection<? extends Address> mbrs) voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedintReturns the size (in bytes) of the marshalled objectserver(boolean c) toString()voidwriteTo(DataOutput outstream) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
sender
-
flags
protected byte flags -
logical_name
-
physical_addr
-
mbrs
-
is_server
protected static final byte is_server- See Also:
-
is_coord
protected static final byte is_coord- See Also:
-
-
Constructor Details
-
PingData
public PingData() -
PingData
-
PingData
public PingData(Address sender, boolean is_server, String logical_name, PhysicalAddress physical_addr)
-
-
Method Details
-
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface- Specified by:
createin interfaceConstructable<PingData>
-
coord
-
server
-
isCoord
public boolean isCoord() -
isServer
public boolean isServer() -
getSender
-
getAddress
-
getLogicalName
-
getPhysicalAddr
-
mbrs
-
mbrs
-
equals
-
hashCode
public int hashCode() -
toString
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
Description 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:
IOException
-
readFrom
Description 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:
IOExceptionClassNotFoundException
-