public interface Invokable<O,P extends java.io.Serializable,R>
extends java.io.Serializable
invoke
call. The eval
method can be used to implement "map"
operations, and the merge
method can be used to implement "reduce" operations.R eval(O toEval, P param, EvalArgs<O> args) throws InvokeException, java.lang.InterruptedException
toEval
- object to evaluateparam
- parameters objectargs
- evaluation argumentsInvokeException
- if an error occurred. This exception will be passed back to the invoker in the InvokeResult
.java.lang.InterruptedException
- if any thread has interrupted the current thread.R merge(R first, R second) throws InvokeException, java.lang.InterruptedException
first
- first result objectsecond
- second result objectInvokeException
- if an error occurred. This exception will be passed back to the invoker in the InvokeResult
.java.lang.InterruptedException
- if any thread has interrupted the current thread.