- java.lang.Object
-
- com.pervasive.datarush.cal.DistributedCommand<T>
-
- Type Parameters:
T
- the result type.
- All Implemented Interfaces:
DistributedCallable<T>
,Serializable
public abstract class DistributedCommand<T> extends Object implements DistributedCallable<T>
Convenient base class forDistributedCallable
's that do not support monitoring/partial results.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DistributedCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T
execute(DistributedCallableContext ctx)
Subclasses must override to provide an execution implementationMonitoredCallable<T>
init(DistributedCallableContext ctx)
Implementation of init that returns a callable whosecall
method invokesexecute(DistributedCallableContext)
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pervasive.datarush.cal.DistributedCallable
merge
-
-
-
-
Method Detail
-
init
public final MonitoredCallable<T> init(DistributedCallableContext ctx)
Implementation of init that returns a callable whosecall
method invokesexecute(DistributedCallableContext)
.- Specified by:
init
in interfaceDistributedCallable<T>
- Parameters:
ctx
- a remote context from which the callable can obtain its distributed identity, etc.- Returns:
- the actual callable to invoke.
-
execute
protected abstract T execute(DistributedCallableContext ctx) throws Exception
Subclasses must override to provide an execution implementation- Parameters:
ctx
- the context that was passed toinit(DistributedCallableContext)
.- Returns:
- the result
- Throws:
Exception
- if an exception occurred while processing
-
-