ibis.util
Class PoolInfoServer

java.lang.Object
  extended byjava.lang.Thread
      extended byibis.util.PoolInfoServer
All Implemented Interfaces:
java.lang.Runnable

public class PoolInfoServer
extends java.lang.Thread

A PoolInfoServer runs as a separate program or thread, and collects information about nodes involved in a run. It is a bit like the Ibis nameserver, but can be used by application programs. An application run is identified by a key. Each node involved in the run sends this key, the total number of hosts, and its cluster name to the PoolInfoServer. When all nodes involved in the run have sent their data, the PoolInfoServer sends back the following information to each node:
- a rank number
- an array of cluster names, one for each node.
- an array of host addresses, one for each node.


Field Summary
static int POOL_INFO_PORT
          Default port on which the PoolInfoServer is accepting connections.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PoolInfoServer(boolean single)
          Creates a PoolInfoServer that will accept connections on the default port.
PoolInfoServer(int port, boolean single)
          Creates a PoolInfoServer that will accept connections on the specified port.
 
Method Summary
static void main(java.lang.String[] argv)
          Main program of the PoolInfoServer.
 void run()
          Main loop of the PoolInfoServer.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POOL_INFO_PORT

public static final int POOL_INFO_PORT
Default port on which the PoolInfoServer is accepting connections.

See Also:
Constant Field Values
Constructor Detail

PoolInfoServer

public PoolInfoServer(int port,
                      boolean single)
Creates a PoolInfoServer that will accept connections on the specified port.

Parameters:
port - the port number to accept connections on.
single - when true, the server returns as soon as no keys are being processed anymore.

PoolInfoServer

public PoolInfoServer(boolean single)
Creates a PoolInfoServer that will accept connections on the default port.

Parameters:
single - when true, the server returns as soon as no keys are being processed anymore.
Method Detail

main

public static void main(java.lang.String[] argv)
Main program of the PoolInfoServer. The parameters accepted are:
-single    a "single" run: exit as soon as no key is being processed anymore.
-port portnum    accept connections on port portnum instead of on the default port.


run

public void run()
Main loop of the PoolInfoServer. Accepts new connections and processes the information sent. As soon as all data associated with a key is available, it is broadcasted among all members of the run, and the key is made available for future runs.



The Ibis project