org.jini.rio.monitor
Class ProvisionMonitor.PeerInfo

java.lang.Object
  extended by org.jini.rio.monitor.ProvisionMonitor.PeerInfo
All Implemented Interfaces:
Serializable, Comparable
Enclosing interface:
ProvisionMonitor

public static class ProvisionMonitor.PeerInfo
extends Object
implements Comparable, Serializable

Contains information about ProvisionMonitor peers involved in providing support for backup approach

See Also:
Serialized Form

Constructor Summary
ProvisionMonitor.PeerInfo(ProvisionMonitor service, long id, String address)
          Create a new PeerInfo
 
Method Summary
 int compareTo(Object o)
          Compare PeerInfo instances to each other to determine natural order.
 boolean equals(Object o)
          PeerInfo instances are equal when their ProvisionMonitor service instance is equal
 String getAddress()
          Get the TCP/IP address of the machine the ProvisionMonitor is running on
 Integer getBackupCount()
          Get the number of ProvisionMonitors are backed up
 Long getID()
           
 ProvisionMonitor getService()
          Get the ProvisionMonitor service
 int hashCode()
          Override hashCode to return the hashCode of the service
 void setBackupCount(int bCount)
          Set the count property
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProvisionMonitor.PeerInfo

public ProvisionMonitor.PeerInfo(ProvisionMonitor service,
                                 long id,
                                 String address)
Create a new PeerInfo

Parameters:
service - ProvisionMonitor proxy
id - A random number identifier to be used to break ties
address - The TCP/IP address of the machine the ProvisionMonitor is running on
Method Detail

getID

public Long getID()

getAddress

public String getAddress()
Get the TCP/IP address of the machine the ProvisionMonitor is running on


setBackupCount

public void setBackupCount(int bCount)
Set the count property

Parameters:
bCount - The new count for the amount of backups the ProvisionMonitor is a backup for

getBackupCount

public Integer getBackupCount()
Get the number of ProvisionMonitors are backed up


getService

public ProvisionMonitor getService()
Get the ProvisionMonitor service


hashCode

public int hashCode()
Override hashCode to return the hashCode of the service

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
PeerInfo instances are equal when their ProvisionMonitor service instance is equal

Overrides:
equals in class Object

compareTo

public int compareTo(Object o)
Compare PeerInfo instances to each other to determine natural order. Order is determined by backup count and lastly random ID

Specified by:
compareTo in interface Comparable


Copyright (c) 2005 Sun Microsystems, Inc.
Copyright (c) 2006 GigaSpaces Technologies, Inc.
All Rights Reserved.