TInput - input typeTOutput - output typepublic interface VortexFunction<TInput,TOutput> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
TOutput |
call(TInput input) |
Codec<TInput> |
getInputCodec()
Users must define codec for the input.
|
Codec<TOutput> |
getOutputCodec()
Users must define codec for the output.
|
TOutput call(TInput input) throws Exception
input - of the functionException - thrown here will bubble up in VortexFuture#get as ExecutionException
Exception should be thrown only after all resources are released as they cannot be cleared by Vortex
For example if threads are spawned here, shut them down before throwing an exceptionCodec<TInput> getInputCodec()
VoidCodec can be used if the input is
empty, and SerializableCodec can be used for (Serializable input.
MatMulInputCodec is an example of codec for the custom input.Codec<TOutput> getOutputCodec()
VoidCodec can be used if the output is
empty, and SerializableCodec can be used for (Serializable output.
MatMulOutputCodec is an example of codec for the custom output.Copyright © 2016 The Apache Software Foundation. All rights reserved.