ibis.util
Class PoolInfoClient

java.lang.Object
  extended byibis.util.PoolInfo
      extended byibis.util.PoolInfoClient

public class PoolInfoClient
extends PoolInfo

The PoolInfoClient class provides a utility for finding out information about the nodes involved in a closed-world run. It is a client for a PoolInfoServer. The best way to access pool information is to obtain a PoolInfo by means of the PoolInfo.createPoolInfo static method. This is the most flexible, only creating a PoolInfoClient when a more knowledgeable PoolInfo cannot be created.
The PoolInfoClient class depends on the following system properties:

ibis.pool.total_hosts
must be present, and contain the total number of hosts involved in the run.
ibis.pool.cluster
must contain the cluster name of the current node. If not present, "unknown" is used.
ibis.pool.key
must contain the key identifying the current run. If not present, the ibis.name_server.key is tried. If that is not present either, "unknown" is used.
ibis.pool.server.port
must contain the port number on which the PoolInfoServer is accepting connections. If not present, ibis.name_server.port is tried. If present, 1 is added and that is used as port number. If not, the default is used.
ibis.pool.server.host
must contain the hostname of the host on which the PoolInfoServer runs. If not present, ibis.name_server.host is tried. One of the two system properties must be defined.


Method Summary
 java.lang.String clusterName()
          Returns the cluster name for the current host.
 java.lang.String clusterName(int rank)
          Returns the cluster name for the host specified by the rank number.
 java.lang.String[] clusterNames()
          Returns an array of cluster names, one for each host involved in the run.
static PoolInfoClient create()
          Creates a PoolInfoClient if not already present.
static void main(java.lang.String[] argv)
          For testing purposes: a main program.
 java.lang.String toString()
          Returns a string representation of the information in this PoolInfo.
 
Methods inherited from class ibis.util.PoolInfo
clusterIPRank, clusterIPSize, createPoolInfo, createPoolInfo, hostName, hostName, hostNames, printTime, rank, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] argv)
For testing purposes: a main program.


create

public static PoolInfoClient create()
Creates a PoolInfoClient if not already present.

Returns:
the PoolInfoClient.

clusterName

public java.lang.String clusterName()
Description copied from class: PoolInfo
Returns the cluster name for the current host.

Overrides:
clusterName in class PoolInfo
Returns:
the cluster name.

clusterName

public java.lang.String clusterName(int rank)
Description copied from class: PoolInfo
Returns the cluster name for the host specified by the rank number.

Overrides:
clusterName in class PoolInfo
Parameters:
rank - the rank number.
Returns:
the cluster name.

clusterNames

public java.lang.String[] clusterNames()
Description copied from class: PoolInfo
Returns an array of cluster names, one for each host involved in the run.

Overrides:
clusterNames in class PoolInfo
Returns:
the cluster names

toString

public java.lang.String toString()
Description copied from class: PoolInfo
Returns a string representation of the information in this PoolInfo.

Overrides:
toString in class PoolInfo
Returns:
a string representation.


The Ibis project