|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.peer.core.xms.ExecutionManager
public class ExecutionManager
Constructor Summary | |
---|---|
ExecutionManager(Peer managed_peer,
long consumption_timeout)
|
Method Summary | |
---|---|
void |
cancelLocalTaskOnLocalResource(Task t,
byte[] logs)
The managed Peer instructs itself to cancel a Local Task running locally. |
void |
cancelLocalTaskOnSupplyingResource(java.lang.String supplier_id,
Task t)
Notifies Consumer Peer of the cancellation of target Task on the Supplier Peer. |
void |
cancelLocalTaskOnSupplyingResource(Task t)
Notifies Consumer Peer of the cancellation of target Task on the Supplier Peer. |
void |
cancelSupplyingTaskOnLocalResource(Task t)
Asks this (Supplier) Peer to cancel target Supplying Task. |
RequestStatus |
completeLocalTaskOnLocalResource(Task t)
|
RequestStatus |
completeLocalTaskOnSupplyingResource(Task t)
|
RequestStatus |
completeSupplyingTaskOnLocalResource(Task t)
|
int |
countRunningConsumptionTasks()
|
int |
countRunningLocalTasks()
|
int |
countRunningSupplyingTasks()
|
double |
estimateMeanLocalTaskRuntime()
|
double |
estimateMeanSelfRuntime()
|
double |
estimateMeanSupplierRuntime()
|
double |
estimateMeanSupplyingTaskRuntime()
|
long |
getCancelledConsumptionTasksCount()
|
long |
getCancelledConsumptionTasksTotalRuntime()
|
long |
getCancelledLocalTasksCount()
|
long |
getCancelledLocalTasksTotalRuntime()
|
long |
getCancelledSupplyingTasksCount()
|
long |
getCancelledSupplyingTasksTotalRuntime()
|
long |
getCompletedConsumptionTasksCount()
|
long |
getCompletedConsumptionTasksTotalRuntime()
|
long |
getCompletedLocalTasksCount()
|
long |
getCompletedLocalTasksTotalRuntime()
|
long |
getCompletedSupplyingTasksCount()
|
long |
getCompletedSupplyingTasksTotalRuntime()
|
double |
getLocalToTotalTasksRatio()
|
Task |
getMostRecentlyRunningAndUngracedSupplyingTask()
Returns the most recently running Supplying Task that has not been graced (useful for PSufferage Resource selection to preempt a running Supplying Task). |
long |
getRunConsumptionTasksCount()
|
long |
getRunLocalTasksCount()
|
long |
getRunSupplyingTasksCount()
|
long |
getStartTime(Task t,
RequestType rt)
Returns the start time of target Task's execution. |
double |
getSupplyingToTotalTasksRatio()
|
RequestType |
identifyRunningTaskType(Task t)
Identity running Task type. |
boolean |
isSupplyingTaskGraced(Task t)
Identifies if target Supplying Task has been graced |
Task[] |
listRunningConsumptionTasks()
Lists running Consumption Tasks, in decreasing order of execution time (longest-running first). |
Task[] |
listRunningLocalTasks()
Lists running Local Tasks, in decreasing order of execution time (longest-running first). |
Task[] |
listRunningSupplyingTasks()
Lists running Supplying Tasks, in decreasing order of execution time (longest-running first). |
void |
preemptLocalTaskOnLocalResource(Task t,
byte[] logs)
The managed Peer instructs itself to preempt a Local Task running locally. |
void |
preemptSupplyingTaskOnLocalResource(Task t,
byte[] logs)
The managed Peer instructs itself to preempt a Supplying Task running locally. |
boolean |
processTimedOutConsumptionTasks()
Cancels timed-out Consumption Tasks. |
boolean |
processTimedOutLocalTasks()
Cancels timed-out Local Tasks. |
boolean |
processTimedOutSupplyingTasks()
Cancels timed-out Supplying Tasks. |
boolean |
runLocalTaskOnLocalResource(Task t,
ResourceHandle rh)
Runs target Task on target Resource. |
boolean |
runLocalTaskOnSupplyingResource(Task t,
ExternalPeerHandle peer_handle)
Returns the target Task on target Supplier Peer. |
boolean |
runSupplyingTaskOnLocalResource(Task t,
ResourceHandle rh)
Runs target Task on target Resource. |
java.lang.String |
toString()
|
boolean |
updateSupplyingTaskTimeOutAction(Task t,
boolean do_cancel,
long time_out)
Updates the time-out and action tag associated with the target Supplying Task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExecutionManager(Peer managed_peer, long consumption_timeout) throws GridException
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public long getRunLocalTasksCount()
public long getRunSupplyingTasksCount()
public long getRunConsumptionTasksCount()
public long getCancelledLocalTasksTotalRuntime()
public long getCancelledLocalTasksCount()
public long getCancelledSupplyingTasksTotalRuntime()
public long getCancelledSupplyingTasksCount()
public long getCancelledConsumptionTasksTotalRuntime()
public long getCancelledConsumptionTasksCount()
public long getCompletedLocalTasksTotalRuntime()
public long getCompletedLocalTasksCount()
public long getCompletedSupplyingTasksTotalRuntime()
public long getCompletedSupplyingTasksCount()
public long getCompletedConsumptionTasksTotalRuntime()
public long getCompletedConsumptionTasksCount()
public double estimateMeanLocalTaskRuntime()
public double estimateMeanSupplyingTaskRuntime()
public double getLocalToTotalTasksRatio()
public double getSupplyingToTotalTasksRatio()
public double estimateMeanSelfRuntime()
public double estimateMeanSupplierRuntime()
public boolean runLocalTaskOnLocalResource(Task t, ResourceHandle rh) throws GridException
rh
- target Resourcet
- target Task
GridException
public boolean runSupplyingTaskOnLocalResource(Task t, ResourceHandle rh) throws GridException
rh
- target Resourcet
- target Task
GridException
public boolean runLocalTaskOnSupplyingResource(Task t, ExternalPeerHandle peer_handle) throws GridException
t
- target Taskpeer_handle
- target Supplier Peer
GridException
- if a parameter is illegalpublic long getStartTime(Task t, RequestType rt) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic boolean updateSupplyingTaskTimeOutAction(Task t, boolean do_cancel, long time_out) throws GridException
t
- target Taskdo_cancel
- time-out action tagtime_out
- time-out
GridException
- if a parameter is illegalpublic boolean isSupplyingTaskGraced(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic Task getMostRecentlyRunningAndUngracedSupplyingTask() throws GridException
GridException
public RequestType identifyRunningTaskType(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic RequestStatus completeLocalTaskOnLocalResource(Task t) throws GridException
GridException
public RequestStatus completeSupplyingTaskOnLocalResource(Task t) throws GridException
GridException
public RequestStatus completeLocalTaskOnSupplyingResource(Task t) throws GridException
GridException
public void cancelLocalTaskOnLocalResource(Task t, byte[] logs) throws GridException
GridException
public void preemptLocalTaskOnLocalResource(Task t, byte[] logs) throws GridException
Note: Task preemption is non-terminating cancellation of a Task.
GridException
public void preemptSupplyingTaskOnLocalResource(Task t, byte[] logs) throws GridException
Note: Task preemption is non-terminating cancellation of a Task.
Note: as opposed to the pair of cancelXTaskOnXResource() methods, there is no symmetry for preemptSupplyingTaskOnLocalResource(), because there is no interest to announce delays in Supplying Task execution through preemptLocalTaskOnSupplyingResource().
GridException
public void cancelSupplyingTaskOnLocalResource(Task t) throws GridException
Note: cancelSupplyingTaskOnLocalResource() would be called by this Peer, or by another Peer (through the ExternalPeerHandle).
Note: Task cancellation is terminating cancellation of a Task.
GridException
public void cancelLocalTaskOnSupplyingResource(Task t) throws GridException
Note: cancelLocalTaskOnSupplyingResource() would be called by this Peer, or by another Peer (through the ExternalPeerHandle).
Note: Task cancellation is terminating cancellation of a Task.
GridException
public void cancelLocalTaskOnSupplyingResource(java.lang.String supplier_id, Task t) throws GridException
Note: cancelLocalTaskOnSupplyingResource() would be called by this Peer, or by another Peer (through the ExternalPeerHandle).
Note: Task cancellation is terminating cancellation of a Task.
GridException
public boolean processTimedOutConsumptionTasks() throws GridException
GridException
public boolean processTimedOutLocalTasks() throws GridException
GridException
public boolean processTimedOutSupplyingTasks() throws GridException
GridException
public int countRunningLocalTasks() throws GridException
GridException
public int countRunningSupplyingTasks() throws GridException
GridException
public int countRunningConsumptionTasks() throws GridException
GridException
public Task[] listRunningLocalTasks()
public Task[] listRunningSupplyingTasks()
public Task[] listRunningConsumptionTasks()
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.