|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--lima.distribution.DServer
DServer is the magic that is a Combined WorkUnit Processor and Server. TODO Call alldone at the right time. TODO: What happens if a wu is given up on, then comes back before/after being sent back a (second time) Tested by dc
| Nested Class Summary | |
class |
DServer.ClientSpeedUpdateEvent
An event indicating that the speed measurement of a client has been updated. |
class |
DServer.ClientWorkUnitRequestAcceptedEvent
An event indicating that a request for a work unit was accepted. |
class |
DServer.ClientWorkUnitRequestEvent
An event indicating that a work unit has been requested. |
class |
DServer.ClientWorkUnitSubmissionAcceptedEvent
An event indicating that a submitted work unit was accepted. |
class |
DServer.ClientWorkUnitSubmissionEvent
An event indicating that a work unit has been submitted. |
class |
DServer.JobCompletionEvent
An event indicating that a job has been completed. |
class |
DServer.JobCreationEvent
An event indicating that a job has been created. |
class |
DServer.JobFailureEvent
An event indicating that a job has failed. |
class |
DServer.MemoryUsageEvent
An event describing the current memory usage. |
class |
DServer.WorkUnitCountersEvent
An event indicating the current work unit counter values. |
| Field Summary | |
static int |
BESTTIME
We aim for clients to turn around a wu in this time The system will try to create cwus that thake this long in real time on a client. |
static boolean |
DEBUG
Set do we want to debug. |
static java.lang.String |
serverName
The name for this server when bound in the RMI Registry. |
static boolean |
VERBOSE
We can also be more verbose about what we are doing. |
static int |
WAITTIME
The longest time to wait for a workunit to be send back If a client takes more than this time before sending the wu back, then we assume that the client has crashed, and schedule it to be resent. |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
DServer()
This constructor is needed since the default constructor must throw RemoteException |
|
| Method Summary | |
void |
clearObservers()
Unregister all observers for an observable object. |
static void |
main(java.lang.String[] args)
Start up a standalone DServer.This is the normal way to create a DServer. |
void |
notifyObservers(lima.observation.Event event)
Notify all registered observers of the specified event. |
void |
process(lima.distribution.WorkUnitSink sink,
lima.distribution.WorkUnitSource source)
Do the job defined by source and sink. |
void |
registerObserver(lima.observation.Observer observer)
Register the specified observer with an observable object. |
lima.distribution.WorkUnit |
requestWorkUnit()
Called by the client when it wants more work. |
void |
run()
Implementation provided for clients that require a runnable interface. |
void |
submitWorkUnit(lima.distribution.WorkUnit u)
Called by the client to send back a finished work unit. |
java.lang.String |
toString()
Produce a status string. |
void |
unregisterObserver(lima.observation.Observer observer)
Unregister the specified observer with an observable object. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final boolean DEBUG
public static final boolean VERBOSE
public static final int BESTTIME
public static final int WAITTIME
public static final java.lang.String serverName
| Constructor Detail |
public DServer()
throws java.rmi.RemoteException
| Method Detail |
public void process(lima.distribution.WorkUnitSink sink,
lima.distribution.WorkUnitSource source)
throws java.rmi.RemoteException
process in interface WorkUnitProcessorsource - - Provides WorkUnitssink - - Callback to flush finished workunits.
java.rmi.RemoteExceptionWorkUnitProcessor.process(WorkUnitSink, WorkUnitSource)
public lima.distribution.WorkUnit requestWorkUnit()
throws java.rmi.RemoteException,
NoWorkException
requestWorkUnit in interface WorkUnitServerjava.rmi.RemoteException
NoWorkExceptionWorkUnitServer.requestWorkUnit()
public void submitWorkUnit(lima.distribution.WorkUnit u)
throws java.rmi.RemoteException
submitWorkUnit in interface WorkUnitServeru - - The finished WorkUnit.
java.rmi.RemoteExceptionWorkUnitServer.submitWorkUnit(lima.distribution.WorkUnit)public java.lang.String toString()
toString in class java.rmi.server.RemoteObjectObject.toString()public static void main(java.lang.String[] args)
args - public void run()
run in interface java.lang.Runnablepublic void registerObserver(lima.observation.Observer observer)
registerObserver in interface Observablepublic void unregisterObserver(lima.observation.Observer observer)
unregisterObserver in interface Observablepublic void clearObservers()
clearObservers in interface Observablepublic void notifyObservers(lima.observation.Event event)
notifyObservers in interface Observable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||