|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
| 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 | |
|---|---|
java.lang.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. <p/> 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. <p/> 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(java.io.DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object. |
void |
readExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader 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. |
java.lang.String |
toString()Return a human-readable task description. |
void |
writeExternal(java.io.DataOutput out)Save the contents of this object by storing the object's state into the passed DataOutput object. |
void |
writeExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter 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
work - the Work to executelWorkId - the Work idnMemberId - the Member idfFeedback - true if a feedback is requested (listener)commonj.work.WorkException - thrown if serialization results in an exception| Method Detail |
|---|
public void init(InvocationService service)
init in interface Invocableinit in class AbstractInvocableservice - the containing InvocationServicepublic void run()
public int getSchedulingPriority()
This implementation returns SCHEDULE_STANDARD.
getSchedulingPriority in interface PriorityTaskgetSchedulingPriority in class WorkManager.AbstractWorkpublic 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. <p/> 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 PriorityTaskgetExecutionTimeoutMillis in class AbstractInvocablepublic commonj.work.Work getWork()
public java.lang.Throwable getException()
public boolean isFeedbackRequested()
public int getStatus()
public void setStatus(int nStatus)
nStatus - a new status of the underlying Work
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface ExternalizableLitereadExternal in class WorkManager.AbstractWorkin - the DataInput stream to read data from in order to restore the state of this objectjava.io.IOException - if an I/O exception occursjava.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface ExternalizableLitewriteExternal in class WorkManager.AbstractWorkout - the DataOutput stream to write the state of this object tojava.io.IOException - if an I/O exception occurs
public void readExternal(PofReader in)
throws java.io.IOException
readExternal in interface PortableObjectreadExternal in class WorkManager.AbstractWorkin - the PofReader from which to read the object's statejava.io.IOException - if an I/O error occurs
public void writeExternal(PofWriter out)
throws java.io.IOException
writeExternal in interface PortableObjectwriteExternal in class WorkManager.AbstractWorkout - the PofWriter to which to write the object's statejava.io.IOException - if an I/O error occurspublic java.lang.String toString()
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||