|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.executor.juc.CallableTaskAdapter<T>
public class CallableTaskAdapter<T extends Serializable>
An adapter allowing to execute a Callable
using Space task executors.
Constructor Summary | |
---|---|
CallableTaskAdapter()
Here just for externalizable. |
|
CallableTaskAdapter(Callable<T> callable)
Constructs a new callable task adapter with the callable to call . |
Method Summary | |
---|---|
T |
execute()
Simply delegates the execution to Callable.call() . |
protected Callable<T> |
getCallable()
Returns the embedded callable. |
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. |
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 CallableTaskAdapter()
public CallableTaskAdapter(Callable<T> callable)
call
.
Method Detail |
---|
public T execute() throws Exception
Callable.call()
.
execute
in interface Task<T extends Serializable>
Exception
- if unable to compute a resultpublic Object[] getObjectsToProcess()
getObjectsToProcess
in interface ProcessObjectsProvider
public Object getRouting()
getRouting
in interface TaskRoutingProvider
protected Callable<T> getCallable()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |