GigaSpaces XAP 9.7.2 API

org.openspaces.core.executor.support
Class AbstractDelegatingDistributedTask<T extends Serializable,R>

java.lang.Object
  extended by org.openspaces.core.executor.support.SimpleDelegatingTask<T>
      extended by org.openspaces.core.executor.support.AbstractDelegatingDistributedTask<T,R>
All Implemented Interfaces:
AsyncResultFilter<T>, AsyncResultsReducer<T,R>, Serializable, DistributedTask<T,R>, DelegatingTask<T>, Task<T>, TaskRoutingProvider
Direct Known Subclasses:
AvgTask, MaxTask, MinTask, PrivilegedDistributedTask, SimpleDelegatingDistributedTask, SumTask

public abstract class AbstractDelegatingDistributedTask<T extends Serializable,R>
extends SimpleDelegatingTask<T>
implements DistributedTask<T,R>, AsyncResultFilter<T>

A base class for delegating tasks that are also distributed tasks

Author:
kimchy
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.gigaspaces.async.AsyncResultFilter
AsyncResultFilter.Decision
 
Constructor Summary
protected AbstractDelegatingDistributedTask()
           
  AbstractDelegatingDistributedTask(Task<T> task)
           
  AbstractDelegatingDistributedTask(Task<T> task, AsyncResultFilter<T> filter)
           
 
Method Summary
protected  void _readExternal(ObjectInput input)
           
protected  void _writeExternal(ObjectOutput output)
           
protected  AsyncResultFilter<T> getFilter()
           
 AsyncResultFilter.Decision onResult(AsyncResultFilterEvent<T> event)
          A callback invoked for each result that arrives as a result of a distributed task execution allowing to access the result that caused this event, the events received so far, and the total expected results.
 
Methods inherited from class org.openspaces.core.executor.support.SimpleDelegatingTask
execute, getDelegatedTask, getRouting
 
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
 
Methods inherited from interface com.gigaspaces.async.AsyncResultsReducer
reduce
 

Constructor Detail

AbstractDelegatingDistributedTask

protected AbstractDelegatingDistributedTask()

AbstractDelegatingDistributedTask

public AbstractDelegatingDistributedTask(Task<T> task)

AbstractDelegatingDistributedTask

public AbstractDelegatingDistributedTask(Task<T> task,
                                         AsyncResultFilter<T> filter)
Method Detail

onResult

public AsyncResultFilter.Decision onResult(AsyncResultFilterEvent<T> event)
Description copied from interface: AsyncResultFilter
A callback invoked for each result that arrives as a result of a distributed task execution allowing to access the result that caused this event, the events received so far, and the total expected results.

Specified by:
onResult in interface AsyncResultFilter<T extends Serializable>

getFilter

protected AsyncResultFilter<T> getFilter()

_writeExternal

protected void _writeExternal(ObjectOutput output)
                       throws IOException
Overrides:
_writeExternal in class SimpleDelegatingTask<T extends Serializable>
Throws:
IOException

_readExternal

protected void _readExternal(ObjectInput input)
                      throws IOException,
                             ClassNotFoundException
Overrides:
_readExternal in class SimpleDelegatingTask<T extends Serializable>
Throws:
IOException
ClassNotFoundException

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.