public class RunnableDistributedTaskAdapter<T extends Serializable,R> extends RunnableTaskAdapter<T> implements DistributedTask<T,R>, AsyncResultFilter<T>
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.AsyncResultFilter.Decision| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
execute, getObjectsToProcess, getRouting, getRunnableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenabledSmartExternalizableWithReferencepublic RunnableDistributedTaskAdapter()
public RunnableDistributedTaskAdapter(Runnable runnable) throws IllegalArgumentException
AsyncResultFilter.IllegalArgumentExceptionpublic RunnableDistributedTaskAdapter(Runnable runnable, T result)
AsyncResultFilter.public RunnableDistributedTaskAdapter(Runnable runnable, AsyncResultsReducer<T,R> reducer) throws IllegalArgumentException
AsyncResultFilter.IllegalArgumentExceptionpublic RunnableDistributedTaskAdapter(Runnable runnable, T result, AsyncResultsReducer<T,R> reducer) throws IllegalArgumentException
AsyncResultFilter.IllegalArgumentExceptionpublic RunnableDistributedTaskAdapter(Runnable runnable, AsyncResultsReducer<T,R> reducer, AsyncResultFilter<T> filter) throws IllegalArgumentException
IllegalArgumentExceptionpublic RunnableDistributedTaskAdapter(Runnable runnable, T result, AsyncResultsReducer<T,R> reducer, AsyncResultFilter<T> filter) throws IllegalArgumentException
IllegalArgumentExceptionpublic R reduce(List<AsyncResult<T>> results) throws Exception
reduce in interface AsyncResultsReducer<T extends Serializable,R>Exceptionpublic 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 ExternalizablewriteExternal in class RunnableTaskAdapter<T extends Serializable>IOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class RunnableTaskAdapter<T extends Serializable>IOExceptionClassNotFoundExceptionCopyright © GigaSpaces.