|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.mygrid.replicaexecutor.EBReplicaManager
public class EBReplicaManager
Description: This is the main manager of the replica executor module. It
coordinates the ThreadManager
and the
PermissionManager
to do the main job of the module: provide a
way to execute a replica.
Nested Class Summary | |
---|---|
class |
EBReplicaManager.KillerThread
|
Constructor Summary | |
---|---|
EBReplicaManager(EBSchedulerFacade ebSchedulerFacade,
ReplicaExecutorThreadManager replicaExecutorThreadManager,
PermissionManager permissionManager)
Creates a EBReplicaManager with a EBSchedulerFacade , a
ThreadManager and a PermissionManager . |
Method Summary | |
---|---|
protected void |
abortReplicasOfTask(int jobId,
int taskId)
Abort all replicas of a given Task |
void |
cancelReplicasOfJob(int jobId)
Cancel all replicas of a given Job |
void |
executeReplica(ReplicaEntry replica,
GumClient gumClient)
Assign the specified Replica to be executed int the given
GridMachine |
long |
getNumberOfAbortedReplicas()
Returns the number of replicas aborted. |
long |
getNumberOfCancelledReplicas()
Returns the number of replicas cancelled. |
long |
getNumberOfFailedReplicas()
Returns the number of replicas failed. |
long |
getNumberOfFinishedReplicas()
Returns the number of replicas finished. |
long |
getNumberOfRunningReplicas()
Returns the number of replicas running. |
void |
replicaAborted(ReplicaEntry replica)
Notifies the PermissioManager and the
ThreadManager that the given replica has been aborted. |
void |
replicaCanceled(ReplicaEntry replica)
Notifies the PermissionManager and the
ThreadManager that the given replica has been cancelled. |
void |
replicaFailed(ReplicaEntry replica)
Notifies the EBSchedulerFacade , the
PermissioManager and the ThreadManager that
the given replica has failed. |
void |
replicaFinished(ReplicaEntry replica)
Notifies the EBSchedulerFacade , the
PermissioManager and the ThreadManager that
the given replica has finished. |
void |
requestPermission(ReplicaEntry replica,
EventQueue<ResponseEvent<java.lang.Boolean>> responseQueue)
Request permission to access the task's critical region. |
void |
shutdown()
Shuts down the replica manager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EBReplicaManager(EBSchedulerFacade ebSchedulerFacade, ReplicaExecutorThreadManager replicaExecutorThreadManager, PermissionManager permissionManager)
EBSchedulerFacade
, a
ThreadManager
and a PermissionManager
.
ebSchedulerFacade
- The EBSchedulerFacade
replicaExecutorThreadManager
- The ThreadManager
permissionManager
- The PermissionManager
Method Detail |
---|
public void executeReplica(ReplicaEntry replica, GumClient gumClient)
Replica
to be executed int the given
GridMachine
replica
- The Replica
to be executedgumClient
- The GridMachine
where the replica will be
executed.public void replicaCanceled(ReplicaEntry replica)
PermissionManager
and the
ThreadManager
that the given replica has been cancelled.
public void replicaFailed(ReplicaEntry replica)
EBSchedulerFacade
, the
PermissioManager
and the ThreadManager
that
the given replica has failed.
public void replicaFinished(ReplicaEntry replica)
EBSchedulerFacade
, the
PermissioManager
and the ThreadManager
that
the given replica has finished. When a replica is Finished all the other
replicas of the same task should be aborted.
public void replicaAborted(ReplicaEntry replica)
PermissioManager
and the
ThreadManager
that the given replica has been aborted.
public void cancelReplicasOfJob(int jobId)
Job
jobId
- The id of the job whose replicas should be canceled.protected void abortReplicasOfTask(int jobId, int taskId)
Task
jobId
- The id of the job whose replicas should be aborted.taskId
- The id of the task whose replicas should be aborted.public void requestPermission(ReplicaEntry replica, EventQueue<ResponseEvent<java.lang.Boolean>> responseQueue)
replica
- The replica who wants to access it's task's critical
region.responseQueue
- The replica's response queue.public void shutdown()
shutdown
in interface Shutdownable
public long getNumberOfRunningReplicas()
public long getNumberOfAbortedReplicas()
public long getNumberOfFinishedReplicas()
public long getNumberOfFailedReplicas()
public long getNumberOfCancelledReplicas()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |