Rio Project 4.2 API Documentation



org.rioproject.monitor
Class ProvisionMonitor.PeerInfo

java.lang.Object
  extended by org.rioproject.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

Field Summary
static int INITIAL_DEPLOYMENTS_PENDING
           
static int LOADED_INITIAL_DEPLOYMENTS
           
static int LOADING_INITIAL_DEPLOYMENTS
           
 
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()
           
 int getInitialDeploymentLoadState()
          Get the initial deploymemnt state
 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
 void setInitialDeploymentLoadState(int state)
          Set the initial deployment load state
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_DEPLOYMENTS_PENDING

public static final int INITIAL_DEPLOYMENTS_PENDING
See Also:
Constant Field Values

LOADING_INITIAL_DEPLOYMENTS

public static final int LOADING_INITIAL_DEPLOYMENTS
See Also:
Constant Field Values

LOADED_INITIAL_DEPLOYMENTS

public static final int LOADED_INITIAL_DEPLOYMENTS
See Also:
Constant Field Values
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


setInitialDeploymentLoadState

public void setInitialDeploymentLoadState(int state)
Set the initial deployment load state

Parameters:
state -
Throws:
IllegalStateException - if the new state is not valid

getInitialDeploymentLoadState

public int getInitialDeploymentLoadState()
Get the initial deploymemnt state


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 © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.