@FunctionalInterface public interface ProcessorSupplier extends Serializable
Processor
instances. Part of the initialization
chain as explained on ProcessorMetaSupplier
.Modifier and Type | Interface and Description |
---|---|
static interface |
ProcessorSupplier.Context
Context passed to the supplier in the
init() call. |
Modifier and Type | Method and Description |
---|---|
default void |
complete(Throwable error)
Called after the execution has finished on all members, successfully
or not, or immediately, when the execution was aborted due to
a member leaving the cluster.
|
Collection<? extends Processor> |
get(int count)
Called after
init(Context) to retrieve instances of
Processor that will be used during the execution of the Jet job. |
default void |
init(ProcessorSupplier.Context context)
Called on each cluster member after deserialization.
|
static ProcessorSupplier |
of(DistributedSupplier<? extends Processor> processorSupplier)
Returns a
ProcessorSupplier which will delegate to the given
Supplier<Processor> to create all Processor instances. |
default void init(@Nonnull ProcessorSupplier.Context context)
@Nonnull Collection<? extends Processor> get(int count)
init(Context)
to retrieve instances of
Processor
that will be used during the execution of the Jet job.count
- the number of processor this method is required to create
and returndefault void complete(Throwable error)
Note: this method can be called even if init()
or
get()
were not called yet in case the job fails during
the init phase.
error
- the exception (if any) that caused the job to fail;
null
in the case of successful job completion@Nonnull static ProcessorSupplier of(@Nonnull DistributedSupplier<? extends Processor> processorSupplier)
ProcessorSupplier
which will delegate to the given
Supplier<Processor>
to create all Processor
instances.Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.