|
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.RunningTaskManager
public abstract class RunningTaskManager
Method Summary | |
---|---|
void |
addRunningTask(Task t,
long timeout,
ExternalPeerHandle peer_handle,
java.lang.String supplier_id,
boolean do_cancel)
Adds target Task to this running Tasks Manager. |
boolean |
areSomeTasksRunning()
|
boolean |
areSomeTasksTimedOut()
|
int |
countRunningTasks()
|
Task |
getMostRecentlyRunningAndUngracedTask()
Returns the most recently running Task that has not been graced (useful for PSufferage Resource selection to preempt a running Supplying Task). |
long |
getStartTime(Task t)
Returns the start time of target Task's execution. |
java.lang.String |
identifySupplier(Task t)
Identifies which Peer is running the target Task. |
boolean |
isTaskGraced(Task t)
Identifies if target Task has been graced |
Task[] |
listRunningTasks()
Lists running Tasks, in decreasing order of execution time (longest-running first). |
abstract boolean |
processTimedOutTasks()
Processes timed-out Tasks. |
long |
removeRunningTask(Task t)
Removes target Task from this running Tasks Manager. |
java.lang.String |
toString()
|
boolean |
updateTimeOutActionTag(Task t,
boolean do_cancel)
Updates the time-out action tag associated with the target Task. |
boolean |
updateTimeOutActionTagAndValue(Task t,
boolean do_cancel,
long time_out)
Updates the time-out and action tag associated with the target Task. |
void |
updateTimeOutValue(Task t,
long time_out)
Updates the time-out associated with the target Task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void addRunningTask(Task t, long timeout, ExternalPeerHandle peer_handle, java.lang.String supplier_id, boolean do_cancel) throws GridException
t
- target Tasktimeout
- timeout valuepeer_handle
- handle of Peer to contactsupplier_id
- supplier iddo_cancel
- true to cancel the Task upon time-out,
false to only preempt the Task upon time-out
GridException
- if a parameter is illegalpublic long removeRunningTask(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic java.lang.String identifySupplier(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic long getStartTime(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic boolean updateTimeOutActionTag(Task t, boolean do_cancel) throws GridException
t
- target Taskdo_cancel
- time-out action tag
GridException
- if a parameter is illegalpublic void updateTimeOutValue(Task t, long time_out) throws GridException
t
- target Tasktime_out
- time-out
GridException
- if a parameter is illegalpublic boolean updateTimeOutActionTagAndValue(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 isTaskGraced(Task t) throws GridException
t
- target Task
GridException
- if a parameter is illegalpublic boolean areSomeTasksTimedOut() throws GridException
GridException
public boolean areSomeTasksRunning() throws GridException
GridException
public int countRunningTasks() throws GridException
GridException
public Task[] listRunningTasks()
public Task getMostRecentlyRunningAndUngracedTask() throws GridException
GridException
public abstract boolean processTimedOutTasks() throws GridException
GridException
|
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.