@FunctionalInterface public interface ProcessorSupplier extends Serializable, com.hazelcast.security.impl.function.SecuredFunction
Processorinstances. Part of the initialization chain as explained on
|Modifier and Type||Interface and Description|
Context passed to the supplier in the
|Modifier and Type||Method and Description|
Called after the execution has finished on this member - successfully or not.
Called on each cluster member after deserialization.
default void init(@Nonnull ProcessorSupplier.Context context) throws Exception
@Nonnull Collection<? extends Processor> get(int count)
init(Context)to retrieve instances of
Processorthat will be used during the execution of the Jet job.
count- the number of processor this method is required to create and return. It is equal to
default void close(@Nullable Throwable error) throws Exception
Processor.close()has been called on all processors running on this member for this job.
If this method throws an exception, it will be logged and ignored; it won't be reported as a job failure.
Note: this method can be called even if
get() methods were not called in case the job fails
during the init phase.
error- the exception (if any) that caused the job to fail;
nullin the case of successful job completion. Note that it might not be the actual error that caused the job to fail - it can be several other exceptions. We only guarantee that it's non-null if the job didn't complete successfully.
@Nonnull static ProcessorSupplier of(@Nonnull SupplierEx<? extends Processor> processorSupplier)
ProcessorSupplierwhich will delegate to the given
Supplier<Processor>to create all
Copyright © 2021 Hazelcast, Inc.. All rights reserved.