|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.mygrid.scheduler.EBSchedulerFacade
public class EBSchedulerFacade
This class is responsible for queueing events in the
SchedulerEventProcessor
. All communication with objects
inside the SchedulerEventProcessor
is made through this
facade.
Field Summary | |
---|---|
protected SchedulerEventEngine |
schedulerEventProcessor
The SchedulerEventProcessor . |
Constructor Summary | |
---|---|
EBSchedulerFacade()
The constructor. |
Method Summary | |
---|---|
int |
addJob(JobSpec newJobSpec)
Adds a new Job . |
EventQueue<NotifyEvent> |
cancelJob(int jobId)
Cancels a specified Job . |
EventQueue<NotifyEvent> |
cleanFinishedJobs()
Clean the list of terminated jobs |
void |
config(EBReplicaExecutorFacade ebReplicaExecutorFacade)
Configures the EBSchedulerFacade . |
protected SchedulerEventEngine |
createSchedulerEventEngine(Scheduler scheduler,
GumpManager gumpManager,
GumpClient gumpClient,
EBReplicaExecutorFacade ebReplicaExecutorFacade)
|
SchedulerEventEngine |
getEventProcessor()
|
EventQueue<ResponseEvent<java.util.Collection<GridManagerEntry>>> |
getGumEntries(GridManagerListenerRemote newListener)
Gets all GridMachine s from the EBGridManager. |
EventQueue<ResponseEvent<java.util.Collection<GumSpec>>> |
getGumSpecs()
|
EventQueue<ResponseEvent<java.util.Collection<PeerEntry>>> |
getPeerEntries(GridManagerListenerRemote newListener)
Gets all GridMachineProvider's specifications from the EBGridManager. |
void |
gumIsDead(long requestId,
GumID gumID)
Notifies that a GridMachine is dead. |
void |
hereIsGum(GumClient gumClient,
long requestid,
ObjectID peerBrokerAccessID)
Delivers an available grid machine to the scheduler |
EventQueue<ResponseEvent<java.util.Collection<JobEntry>>> |
jobList(JobManagerListenerRemote newListener)
Provides the list of Job s. |
void |
peerAlive(PeerSpec peerSpec)
Notifies EBGridManager that the peer PeerSpec is alive. |
void |
peerIsDead(PeerSpec peerSpec)
Notifies EBGridManager that the peer PeerSpec is dead. |
void |
removeGridManagerListener(GridManagerListenerRemote listener)
|
EventQueue<ResponseEvent> |
removeJob(int jobId)
Remove the information about the specified job |
void |
removeJobManagerListener(JobManagerListenerRemote listener)
|
void |
replicaAborted(ReplicaExecutorResult result)
Notifies that a task replica has been aborted. |
void |
replicaCanceled(ReplicaExecutorResult result)
Notifies that a task replica has canceled. |
void |
replicaFailed(ReplicaExecutorResult result)
Notifies that a task replica has failed. |
void |
replicaFinished(ReplicaExecutorResult result)
Notifies that a task replica has finished. |
void |
setPeers(java.util.Collection<PeerSpec> peerSpecs)
Sets all GridMachineProviders to be used by the Scheduler. |
EventQueue<ShutdownResponseEvent> |
shutdown()
Shuts down the facade. |
void |
startEventProcessor()
Starts the SchedulerEventProcessor |
EventQueue<Event> |
waitForJob(int jobId)
Provides an EventQueue that will only have an element when
the specified Job reaches a terminal state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SchedulerEventEngine schedulerEventProcessor
SchedulerEventProcessor
.
Constructor Detail |
---|
public EBSchedulerFacade()
Method Detail |
---|
public void startEventProcessor()
SchedulerEventProcessor
public void config(EBReplicaExecutorFacade ebReplicaExecutorFacade) throws ConfigException, java.rmi.RemoteException
EBSchedulerFacade
. Creates the RMI objects
that will be accessed by other modules and creates the scheduler event
engine.
ConfigException
java.rmi.RemoteException
protected SchedulerEventEngine createSchedulerEventEngine(Scheduler scheduler, GumpManager gumpManager, GumpClient gumpClient, EBReplicaExecutorFacade ebReplicaExecutorFacade) throws ConfigException
ConfigException
public EventQueue<ResponseEvent<java.util.Collection<JobEntry>>> jobList(JobManagerListenerRemote newListener)
Job
s.
newListener
- TODO
EventQueue
were the list of jobs will be put.public EventQueue<Event> waitForJob(int jobId)
EventQueue
that will only have an element when
the specified Job
reaches a terminal state.
jobId
- The Job
identification.
EventQueue
that will receive an event
when the specified Job
reaches a terminal state.public EventQueue<NotifyEvent> cancelJob(int jobId)
Job
.
jobId
- The Job
identification.public EventQueue<NotifyEvent> cleanFinishedJobs()
public EventQueue<ResponseEvent> removeJob(int jobId)
jobId
-
public int addJob(JobSpec newJobSpec)
Job
.
newJobSpec
- The Job
specification.
Job
identification.public void hereIsGum(GumClient gumClient, long requestid, ObjectID peerBrokerAccessID)
gumClient
- a reference to the grid machine.requestid
- identification of the request that will receive the gumpeerBrokerAccessID
- an id to the grid machine provider (peer) to
which the machine will be given back after executionpublic void replicaFinished(ReplicaExecutorResult result)
result
- The ReplicaExecutorResult
.public void replicaFailed(ReplicaExecutorResult result)
result
- The ReplicaExecutorResult
.public void replicaAborted(ReplicaExecutorResult result)
result
- The ReplicaExecutorResult
.public void replicaCanceled(ReplicaExecutorResult result)
result
- The ReplicaExecutorResult
.public void gumIsDead(long requestId, GumID gumID)
requestId
- The request identificationgumID
- The GridMachine that is deadpublic EventQueue<ResponseEvent<java.util.Collection<GridManagerEntry>>> getGumEntries(GridManagerListenerRemote newListener)
GridMachine
s from the EBGridManager.
newListener
- TODO
EventQueue
containing a
ResponseEvent
whose response value is a list of
GridMachineExtended
objects.public EventQueue<ResponseEvent<java.util.Collection<GumSpec>>> getGumSpecs()
public EventQueue<ResponseEvent<java.util.Collection<PeerEntry>>> getPeerEntries(GridManagerListenerRemote newListener)
EventQueue
containing a
ResponseEvent
whose response value is a list of
GuMPSpec
objects.public void removeJobManagerListener(JobManagerListenerRemote listener)
public void removeGridManagerListener(GridManagerListenerRemote listener)
public void setPeers(java.util.Collection<PeerSpec> peerSpecs)
peerSpecs
- The new list of GridMachineProviders specificationspublic void peerAlive(PeerSpec peerSpec)
PeerSpec
is alive.
peerSpec
- public void peerIsDead(PeerSpec peerSpec)
PeerSpec
is dead.
peerSpec
- public EventQueue<ShutdownResponseEvent> shutdown()
public SchedulerEventEngine getEventProcessor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |