edu.ucsb.cs.jicos.services
Class HspState

java.lang.Object
  extended by edu.ucsb.cs.jicos.services.HspState
All Implemented Interfaces:
java.io.Serializable

public final class HspState
extends java.lang.Object
implements java.io.Serializable

A snapshot of the state of an Hsp.

Author:
Peter Cappello
See Also:
Serialized Form

Method Summary
 Qu getClientQ()
          Get the client queue.
 ServiceName getHspServiceName()
          Get the HSP's ServiceName data.
 int numHosts()
          Get the number of hosts currently available to the Hsp.
 int numTaskServers()
          Get the number of task servers currently available to the Hsp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClientQ

public Qu getClientQ()
Get the client queue.

Returns:
A Qu object that contains ClientQ objects, one for each client that is waiting to use the Hsp (includes the client currently being processed by the Hsp.

getHspServiceName

public ServiceName getHspServiceName()
Get the HSP's ServiceName data.

Returns:
the HSP's ServiceName.

numHosts

public int numHosts()
Get the number of hosts currently available to the Hsp. Since each task server updates the Hsp with its current number of hosts only every 30 seconds, this method's returned value may be 30 seconds out of date.

Returns:
The number of hosts available, from the point of view of the Hsp (which is a somewhat delayed version of reality).

numTaskServers

public int numTaskServers()
Get the number of task servers currently available to the Hsp.

Returns:
The number of task servers available.


Jicos: http://cs.ucsb.edu/projects/jicos