org.jgroups.protocols
Class PingData

java.lang.Object
  extended by org.jgroups.protocols.PingData
All Implemented Interfaces:
SizeStreamable, Streamable

public class PingData
extends java.lang.Object
implements SizeStreamable

Encapsulates information about a cluster node, e.g. local address, coordinator's address, logical name and physical address(es)

Author:
Bela Ban

Field Summary
protected  boolean is_server
           
protected  java.lang.String logical_name
           
protected  java.util.Collection<PhysicalAddress> physical_addrs
           
protected  Address sender
           
protected  View view
           
protected  ViewId view_id
           
 
Constructor Summary
PingData()
           
PingData(Address sender, View view, boolean is_server)
           
PingData(Address sender, View view, boolean is_server, java.lang.String logical_name, java.util.Collection<PhysicalAddress> physical_addrs)
           
PingData(Address sender, View view, ViewId view_id, boolean is_server, java.lang.String logical_name, java.util.Collection<PhysicalAddress> physical_addrs)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Address getAddress()
           
 Address getCoordAddress()
           
 java.lang.String getLogicalName()
           
 java.util.Collection<Address> getMembers()
           
 java.util.Collection<PhysicalAddress> getPhysicalAddrs()
           
 View getView()
           
 ViewId getViewId()
           
 boolean hasCoord()
           
 int hashCode()
           
 boolean isCoord()
           
 boolean isServer()
           
 java.lang.String printViewId()
           
 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 closed
 void setView(View view)
           
 void setViewId(ViewId view_id)
           
 int size()
          Returns the size (in bytes) of the marshalled object
 java.lang.String toString()
           
 void writeTo(java.io.DataOutput outstream)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sender

protected Address sender

view

protected View view

view_id

protected ViewId view_id

is_server

protected boolean is_server

logical_name

protected java.lang.String logical_name

physical_addrs

protected java.util.Collection<PhysicalAddress> physical_addrs
Constructor Detail

PingData

public PingData()

PingData

public PingData(Address sender,
                View view,
                boolean is_server)

PingData

public PingData(Address sender,
                View view,
                boolean is_server,
                java.lang.String logical_name,
                java.util.Collection<PhysicalAddress> physical_addrs)

PingData

public PingData(Address sender,
                View view,
                ViewId view_id,
                boolean is_server,
                java.lang.String logical_name,
                java.util.Collection<PhysicalAddress> physical_addrs)
Method Detail

isCoord

public boolean isCoord()

hasCoord

public boolean hasCoord()

getAddress

public Address getAddress()

getCoordAddress

public Address getCoordAddress()

getMembers

public java.util.Collection<Address> getMembers()

getView

public View getView()

setView

public void setView(View view)

getViewId

public ViewId getViewId()

setViewId

public void setViewId(ViewId view_id)

isServer

public boolean isServer()

getLogicalName

public java.lang.String getLogicalName()

getPhysicalAddrs

public java.util.Collection<PhysicalAddress> getPhysicalAddrs()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

printViewId

public java.lang.String printViewId()

writeTo

public void writeTo(java.io.DataOutput outstream)
             throws java.lang.Exception
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 interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput instream)
              throws java.lang.Exception
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 interface Streamable
Throws:
java.lang.Exception

size

public int size()
Description copied from interface: SizeStreamable
Returns the size (in bytes) of the marshalled object

Specified by:
size in interface SizeStreamable


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.