Class ComputeWithCustomResultMarshallerExample.WordInfoJob
java.lang.Object
org.apache.ignite.example.compute.ComputeWithCustomResultMarshallerExample.WordInfoJob
- All Implemented Interfaces:
ComputeJob<String,ComputeWithCustomResultMarshallerExample.WordInfoResult>
- Enclosing class:
- ComputeWithCustomResultMarshallerExample
public static class ComputeWithCustomResultMarshallerExample.WordInfoJob
extends Object
implements ComputeJob<String,ComputeWithCustomResultMarshallerExample.WordInfoResult>
Job that calculates length of the provided word.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteAsync(JobExecutionContext context, String arg) Executes the job on an Ignite node.Marshaller for the job result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.compute.ComputeJob
inputMarshaller
-
Constructor Details
-
WordInfoJob
public WordInfoJob()
-
-
Method Details
-
executeAsync
public CompletableFuture<ComputeWithCustomResultMarshallerExample.WordInfoResult> executeAsync(JobExecutionContext context, String arg) Executes the job on an Ignite node.- Specified by:
executeAsyncin interfaceComputeJob<String,ComputeWithCustomResultMarshallerExample.WordInfoResult> - Parameters:
context- The execution context.arg- Job arguments.- Returns:
- Job future. Can be null if the job is synchronous and does not return any result.
-
resultMarshaller
public Marshaller<ComputeWithCustomResultMarshallerExample.WordInfoResult,byte[]> resultMarshaller()Marshaller for the job result. Default isnullmeaning that only primitive types are supported.- Specified by:
resultMarshallerin interfaceComputeJob<String,ComputeWithCustomResultMarshallerExample.WordInfoResult> - Returns:
- Result marshaller.
-