|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibis.util.PoolInfo
ibis.util.PoolInfoClient
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_hostsmust be present, and contain the total number of hosts involved in the run.
ibis.pool.clustermust contain the cluster name of the current node. If not present, "unknown" is used.
ibis.pool.keymust 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.portmust 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.hostmust 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 |
public static void main(java.lang.String[] argv)
public static PoolInfoClient create()
PoolInfoClient
if not already present.
PoolInfoClient
.public java.lang.String clusterName()
PoolInfo
clusterName
in class PoolInfo
public java.lang.String clusterName(int rank)
PoolInfo
clusterName
in class PoolInfo
rank
- the rank number.
public java.lang.String[] clusterNames()
PoolInfo
clusterNames
in class PoolInfo
public java.lang.String toString()
PoolInfo
PoolInfo
.
toString
in class PoolInfo
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |