Interface SandboxCallback<T,R>
-
- Type Parameters:
T
- the type of the input to the taskR
- the type of the result of the task
@ExperimentalApi public interface SandboxCallback<T,R>
During the course of work aSandboxTask
which is executed in a sandbox process may need to ask the host for a specific information or an action. This class allows us to create a piece of code to be called fromSandboxTask
but executed in the host process.As sandbox callbacks are executed in the same thread that called 'execute' method, thread local context will be shared (e.g. transactions).
The class must be public and must have a public parameter less constructor.
- Since:
- 6.10
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
apply(SandboxCallbackContext context, T t)
SandboxSerializer<T>
inputSerializer()
ReturnsSandboxSerializer
for the callback input.SandboxSerializer<R>
outputSerializer()
ReturnsSandboxSerializer
for the callback output.
-
-
-
Method Detail
-
apply
R apply(SandboxCallbackContext context, T t)
-
inputSerializer
SandboxSerializer<T> inputSerializer()
ReturnsSandboxSerializer
for the callback input.
-
outputSerializer
SandboxSerializer<R> outputSerializer()
ReturnsSandboxSerializer
for the callback output.
-
-