|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.core.executor.juc.RunnableTaskAdapter<T>
public class RunnableTaskAdapter<T extends Serializable>
An adapter allowing to execute a Runnable using Space task executors.
| Constructor Summary | |
|---|---|
RunnableTaskAdapter()
Here just for externlizable. |
|
RunnableTaskAdapter(Runnable runnable)
Constructs a new runnable task adapter with the runnable to run. |
|
RunnableTaskAdapter(Runnable runnable,
T result)
Constructs a new runnable task adapter with the runnable to run. |
|
| Method Summary | |
|---|---|
T |
execute()
Simply delegates the execution to Runnable.run() and returns the optional result
provided in the constructor. |
Object[] |
getObjectsToProcess()
Returns the callable passed so it will be processed on the node it is executed on as well. |
Object |
getRouting()
Tries to extract the routing information form the task. |
protected Runnable |
getRunnable()
Returns the embedded runnable. |
void |
readExternal(ObjectInput in)
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RunnableTaskAdapter()
public RunnableTaskAdapter(Runnable runnable)
run.
public RunnableTaskAdapter(Runnable runnable,
T result)
run. Will return
the result after the call to run.
| Method Detail |
|---|
public T execute()
throws Exception
Runnable.run() and returns the optional result
provided in the constructor.
execute in interface Task<T extends Serializable>Exception - if unable to compute a resultpublic Object[] getObjectsToProcess()
getObjectsToProcess in interface ProcessObjectsProviderpublic Object getRouting()
getRouting in interface TaskRoutingProviderprotected Runnable getRunnable()
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||