|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tangosol.util.Base com.tangosol.net.AbstractInvocable com.tangosol.coherence.commonj.WorkManager.AbstractWork com.tangosol.coherence.commonj.WorkManager.ScheduleWork
protected static class WorkManager.ScheduleWork
Invocable task that posts a wrapped Work object to a WorkManager queue.
Field Summary |
---|
Fields inherited from class com.tangosol.coherence.commonj.WorkManager.AbstractWork |
---|
m_lWorkId, m_nMemberId |
Fields inherited from interface com.tangosol.net.PriorityTask |
---|
SCHEDULE_FIRST, SCHEDULE_IMMEDIATE, SCHEDULE_STANDARD, TIMEOUT_DEFAULT, TIMEOUT_NONE |
Constructor Summary | |
---|---|
WorkManager.ScheduleWork()
Default constructor (necessary for a lite serialization). |
|
WorkManager.ScheduleWork(commonj.work.Work work,
long lWorkId,
int nMemberId,
boolean fFeedback)
Construct the ScheduleWork for a given Work. |
Method Summary | |
---|---|
Throwable |
getException()
Return a deserialization exception (if any). |
long |
getExecutionTimeoutMillis()
Obtain the maximum amount of time this task is allowed to run before the corresponding service will attempt to stop it. The value of TIMEOUT_DEFAULT indicates a default
timeout value configured for the corresponding service; the value of
TIMEOUT_NONE indicates that this task can execute
indefinitely.
If, by the time the specified amount of time passed, the task has not
finished, the service will attempt to stop the execution by using the
Thread.interrupt() method. In the case that interrupting the
thread does not result in the task's termination, the
PriorityTask.runCanceled(boolean) method will be called. |
int |
getSchedulingPriority()
Obtain this task's scheduling priority. Valid values are one of the SCHEDULE_* constants.
This implementation returns |
int |
getStatus()
Return a status of the undrlying Work. |
commonj.work.Work |
getWork()
Return a Work object. |
void |
init(InvocationService service)
Called by the InvocationService exactly once on this Invocable object as part of its initialization. |
boolean |
isFeedbackRequested()
Return a feedback flag. |
void |
readExternal(DataInput in)
Restore the contents of this object by loading the object's state from the passed DataInput object. |
void |
run()
Called exactly once by the InvocationService to invoke this Invocable object. |
void |
setStatus(int nStatus)
Change a status of the underlying Work. |
String |
toString()
Return a human-readable task description. |
void |
writeExternal(DataOutput out)
Save the contents of this object by storing the object's state into the passed DataOutput object. |
Methods inherited from class com.tangosol.coherence.commonj.WorkManager.AbstractWork |
---|
getMember, getMemberId, getWorkId |
Methods inherited from class com.tangosol.net.AbstractInvocable |
---|
getRequestTimeoutMillis, getResult, getService, isRespondInOrder, runCanceled, setResult |
Constructor Detail |
---|
public WorkManager.ScheduleWork()
public WorkManager.ScheduleWork(commonj.work.Work work, long lWorkId, int nMemberId, boolean fFeedback) throws commonj.work.WorkException
fFeedback
- true if a feedback is requested (listener)
commonj.work.WorkException
Method Detail |
---|
public void init(InvocationService service)
init
in interface Invocable
init
in class AbstractInvocable
service
- the containing InvocationServicepublic void run()
public int getSchedulingPriority()
This implementation returns SCHEDULE_STANDARD
.
getSchedulingPriority
in interface PriorityTask
getSchedulingPriority
in class WorkManager.AbstractWork
public long getExecutionTimeoutMillis()
TIMEOUT_DEFAULT
indicates a default
timeout value configured for the corresponding service; the value of
TIMEOUT_NONE
indicates that this task can execute
indefinitely.
If, by the time the specified amount of time passed, the task has not
finished, the service will attempt to stop the execution by using the
Thread.interrupt()
method. In the case that interrupting the
thread does not result in the task's termination, the
PriorityTask.runCanceled(boolean)
method will be called.
This implementation returns TIMEOUT_DEFAULT
.
getExecutionTimeoutMillis
in interface PriorityTask
getExecutionTimeoutMillis
in class AbstractInvocable
public commonj.work.Work getWork()
public Throwable getException()
public boolean isFeedbackRequested()
public int getStatus()
public void setStatus(int nStatus)
nStatus
- a new status of the underlying Workpublic void readExternal(DataInput in) throws IOException
readExternal
in interface ExternalizableLite
readExternal
in class WorkManager.AbstractWork
in
- the DataInput stream to read data from in order to restore
the state of this object
IOException
- if an I/O exception occurs
NotActiveException
- if the object is not in its initial
state, and therefore cannot be deserialized intopublic void writeExternal(DataOutput out) throws IOException
writeExternal
in interface ExternalizableLite
writeExternal
in class WorkManager.AbstractWork
out
- the DataOutput stream to write the state of this object to
IOException
- if an I/O exception occurspublic String toString()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |