|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmuskel.DiscoveryService
public class DiscoveryService
This class is used to maintain a list of available (discovered, actually) processing resources, that is
processing elements in the portion of network accessible via multicast messages that currently run a muskel
RemoteWorker RMI object.
The class uses a DiscoveryThread thread to actually perform remote processing elements discovery.
The list of workers maintained by this class
is a simple Vector. New workers requested by the Eval thread
are provided from the start position.
New workers discovered are added at the end.
A list of already given worker (to the Eval thread) is also maintained.
In case a number nw of processing elements is requested, which is not currently available, the calling thread
is actually blocked (wait()) and it is eventually unblocked by the DiscoveryThread communicating
that a new resource is available.
| Constructor Summary | |
|---|---|
DiscoveryService()
standard constructor initializes the vectors and starts the discovery thread |
|
| Method Summary | |
|---|---|
void |
addWorker(java.lang.String w)
used by the DiscoveryThread to place the name of a fresh host discovered in the discvored hosts vector. |
java.lang.String |
getNewWorker()
used from the StandardEval thread to get a fresh host to run a worker |
java.lang.String[] |
getNWorkers(int nw)
used from within the Standard eval to get a set of workers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscoveryService()
lf - the log file handle| Method Detail |
|---|
public java.lang.String getNewWorker()
public java.lang.String[] getNWorkers(int nw)
nw - the number of workers reuquired
public void addWorker(java.lang.String w)
w - the name of the host to be added
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||