|
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.Objectcom.tangosol.util.Base
com.tangosol.net.AbstractInvocable
public abstract class AbstractInvocable
An abstract base for Invocable and PriorityTask implementations.
| Field Summary |
|---|
| Fields inherited from interface com.tangosol.net.PriorityTask |
|---|
SCHEDULE_FIRST, SCHEDULE_IMMEDIATE, SCHEDULE_STANDARD, TIMEOUT_DEFAULT, TIMEOUT_NONE |
| Constructor Summary | |
|---|---|
AbstractInvocable()
|
|
| Method Summary | |
|---|---|
long |
getExecutionTimeoutMillis()
Obtain the maximum amount of time this task is allowed to run before the corresponding service will attempt to stop it. |
long |
getRequestTimeoutMillis()
Obtain the maximum amount of time a calling thread is willing to wait for a result of the request execution. |
Object |
getResult()
Determine the result from the invocation of this object. |
int |
getSchedulingPriority()
Obtain this task's scheduling priority. |
InvocationService |
getService()
Obtain the containing InvocationService. |
void |
init(InvocationService service)
Called by the InvocationService exactly once on this Invocable object as part of its initialization. |
boolean |
isRespondInOrder()
Determine whether this Invocable object has to preserve the order of responses according to the order of requests. |
void |
runCanceled(boolean fAbandoned)
This method will be called if and only if all attempts to interrupt this task were unsuccesful in stopping the execution or if the execution was canceled before it had a chance to run at all. |
protected void |
setResult(Object oResult)
Set the result of the invocation. |
| Constructor Detail |
|---|
public AbstractInvocable()
| Method Detail |
|---|
public void init(InvocationService service)
init in interface Invocableservice - the containing InvocationServicepublic Object getResult()
getResult in interface Invocablepublic boolean isRespondInOrder()
This implementation returns "false".
isRespondInOrder in interface InvocableInOrderpublic int getSchedulingPriority()
This implementation returns SCHEDULE_STANDARD.
getSchedulingPriority in interface PriorityTaskpublic 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 PriorityTaskpublic void runCanceled(boolean fAbandoned)
This implementation is a no-op.
runCanceled in interface PriorityTaskfAbandoned - true if the task has timed-out, but all attempts to
interrupt it were unsuccesful in stopping the execution;
otherwise the task was never startedpublic long getRequestTimeoutMillis()
TIMEOUT_DEFAULT indicates a default
timeout value configured for the corresponding service; the value of
TIMEOUT_NONE indicates that the client thread is
willing to wait indefinitely until the task execution completes or is
canceled by the service due to a task execution timeout specified by the
PriorityTask.getExecutionTimeoutMillis() value.
If the specified amount of time elapsed and the client has not received
any response from the server, an RequestTimeoutException will
be thrown to the caller.
This implementation returns TIMEOUT_DEFAULT.
getRequestTimeoutMillis in interface PriorityTaskpublic InvocationService getService()
protected void setResult(Object oResult)
oResult - the invocation result
|
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 | |||||||