Interface ProcessorSupplier.Context

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

public static interface ProcessorSupplier.Context extends ProcessorMetaSupplier.Context
Context passed to the supplier in the init() call.
Since:
Jet 3.0
  • Method Details

    • logger

      @Nonnull ILogger logger()
      Returns a logger for the associated ProcessorSupplier.
      Specified by:
      logger in interface ProcessorMetaSupplier.Context
    • memberIndex

      int memberIndex()
      Returns the index of the member among all the members that run this job: it's a unique cluster-wide index.

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

    • attachedDirectory

      @Nonnull File attachedDirectory(@Nonnull String id)
      Uses the supplied ID to look up a directory you attached to the current Jet job. Creates a temporary directory with the same contents on the local cluster member and returns the location of the created directory. If the directory was already created, just returns its location.
      Parameters:
      id - the ID you used in a previous JobConfig.attachDirectory(java.net.URL) call
      Since:
      Jet 4.0
    • recreateAttachedDirectory

      @Nonnull File recreateAttachedDirectory(@Nonnull String id)
      Behaves like attachedDirectory(java.lang.String), but if the directory already exists, it deletes and recreates all its contents.
      Since:
      Jet 4.3
    • attachedFile

      @Nonnull File attachedFile(@Nonnull String id)
      Uses the supplied ID to look up a file you attached to the current Jet job. Creates a temporary file with the same contents on the local cluster member and returns the location of the created file. If the file was already created, just returns its location.
      Parameters:
      id - the ID you used in a previous JobConfig.attachFile(java.net.URL) call
      Since:
      Jet 4.0
    • recreateAttachedFile

      @Nonnull File recreateAttachedFile(@Nonnull String id)
      Behaves like attachedFile(java.lang.String), but if the file already exists, it deletes and recreates it.
      Since:
      Jet 4.3
    • managedContext

      @Nonnull ManagedContext managedContext()
      Returns ManagedContext associated with this job.
    • memberPartitions

      @Nonnull default int[] memberPartitions()
      Returns the partitions from ProcessorMetaSupplier.Context.partitionAssignment() pertaining to this member. The returned list can be empty.