com.hazelcast.jet.core

## Interface Processor.Context

- All Superinterfaces:
    ProcessorMetaSupplier.Context, ProcessorSupplier.Context
  All Known Implementing Classes:
    TestProcessorContext
  Enclosing interface:
    Processor

      public static interface Processor.Context
      extends ProcessorSupplier.Context

  Context passed to the processor in the `init()` call.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `globalProcessorIndex()` Returns the index of the processor among all the processors created for this vertex on all nodes: it's a unique cluster-wide index.
    `int` | `localProcessorIndex()` Returns the index of the processor among all the processors created for this vertex on a single node: it's a unique node-wide index.
    `ILogger` | `logger()` Return a logger for the processor
    `ProcessingGuarantee` | `processingGuarantee()` Returns the guarantee for current job.
    `default boolean` | `snapshottingEnabled()` Returns true, if snapshots will be saved for this job.

    - ### Methods inherited from interface com.hazelcast.jet.core.ProcessorSupplier.Context

      `memberIndex`

    - ### Methods inherited from interface com.hazelcast.jet.core.ProcessorMetaSupplier.Context

      `executionId, jetInstance, jobConfig, jobId, localParallelism, memberCount, totalParallelism, vertexName`

- - ### Method Detail

    - #### logger

          @Nonnull
          ILogger logger()

      Return a logger for the processor
      Specified by:
        `logger` in interface `ProcessorMetaSupplier.Context`
      Specified by:
        `logger` in interface `ProcessorSupplier.Context`

    - #### localProcessorIndex

          int localProcessorIndex()

      Returns the index of the processor among all the processors created for this vertex on a single node: it's a unique node-wide index.

      The value is in the range `[0...localParallelism-1]`.

    - #### globalProcessorIndex

          int globalProcessorIndex()

      Returns the index of the processor among all the processors created for this vertex on all nodes: it's a unique cluster-wide index.

      The value is in the range `[0...totalParallelism-1]`.

    - #### snapshottingEnabled

          default boolean snapshottingEnabled()

      Returns true, if snapshots will be saved for this job.

    - #### processingGuarantee

          ProcessingGuarantee processingGuarantee()

      Returns the guarantee for current job.

Copyright © 2018. All rights reserved.