|
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.RunnableTaskAdapter<T> org.openspaces.core.executor.juc.RunnableDistributedTaskAdapter<T,R>
public class RunnableDistributedTaskAdapter<T extends Serializable,R>
An adapter allowing to execute a Runnable
in a distributed fashion. In such a
case, a AsyncResultsReducer
must be implemented or provided (see the different
constructors). An optional AsyncResultFilter
can be also implemented or provided.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.gigaspaces.async.AsyncResultFilter |
---|
AsyncResultFilter.Decision |
Constructor Summary | |
---|---|
RunnableDistributedTaskAdapter()
Here just for externalizable. |
|
RunnableDistributedTaskAdapter(Runnable runnable)
Constructs a new runnable distributed task adapter. |
|
RunnableDistributedTaskAdapter(Runnable runnable,
AsyncResultsReducer<T,R> reducer)
Constructs a new runnable distributed task adapter with a separate reducer. |
|
RunnableDistributedTaskAdapter(Runnable runnable,
AsyncResultsReducer<T,R> reducer,
AsyncResultFilter<T> filter)
Constructs a new runnable distributed task adapter with a separate reducer and filter. |
|
RunnableDistributedTaskAdapter(Runnable runnable,
T result)
Constructs a new runnable distributed task adapter. |
|
RunnableDistributedTaskAdapter(Runnable runnable,
T result,
AsyncResultsReducer<T,R> reducer)
Constructs a new runnable distributed task adapter with a separate reducer. |
|
RunnableDistributedTaskAdapter(Runnable runnable,
T result,
AsyncResultsReducer<T,R> reducer,
AsyncResultFilter<T> filter)
Constructs a new runnable distributed task adapter with a separate reducer and filter. |
Method Summary | |
---|---|
AsyncResultFilter.Decision |
onResult(AsyncResultFilterEvent<T> event)
If a filter is provided in one of the constructor methods, will delegate the call to it. |
void |
readExternal(ObjectInput in)
|
R |
reduce(List<AsyncResult<T>> results)
Delegates the call to the provided reducer. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class org.openspaces.core.executor.juc.RunnableTaskAdapter |
---|
execute, getObjectsToProcess, getRouting, getRunnable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openspaces.core.executor.Task |
---|
execute |
Constructor Detail |
---|
public RunnableDistributedTaskAdapter()
public RunnableDistributedTaskAdapter(Runnable runnable) throws IllegalArgumentException
AsyncResultFilter
.
IllegalArgumentException
public RunnableDistributedTaskAdapter(Runnable runnable, T result)
AsyncResultFilter
.
public RunnableDistributedTaskAdapter(Runnable runnable, AsyncResultsReducer<T,R> reducer) throws IllegalArgumentException
AsyncResultFilter
.
IllegalArgumentException
public RunnableDistributedTaskAdapter(Runnable runnable, T result, AsyncResultsReducer<T,R> reducer) throws IllegalArgumentException
AsyncResultFilter
.
IllegalArgumentException
public RunnableDistributedTaskAdapter(Runnable runnable, AsyncResultsReducer<T,R> reducer, AsyncResultFilter<T> filter) throws IllegalArgumentException
IllegalArgumentException
public RunnableDistributedTaskAdapter(Runnable runnable, T result, AsyncResultsReducer<T,R> reducer, AsyncResultFilter<T> filter) throws IllegalArgumentException
IllegalArgumentException
Method Detail |
---|
public R reduce(List<AsyncResult<T>> results) throws Exception
reduce
in interface AsyncResultsReducer<T extends Serializable,R>
Exception
public AsyncResultFilter.Decision onResult(AsyncResultFilterEvent<T> event)
AsyncResultFilter.Decision.CONTINUE
.
onResult
in interface AsyncResultFilter<T extends Serializable>
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class RunnableTaskAdapter<T extends Serializable>
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class RunnableTaskAdapter<T extends Serializable>
IOException
ClassNotFoundException
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |