Package com.hazelcast.jet.core.test
Class TestProcessorContext
java.lang.Object
com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
com.hazelcast.jet.core.test.TestProcessorSupplierContext
com.hazelcast.jet.core.test.TestProcessorContext
- All Implemented Interfaces:
Processor.Context
,ProcessorMetaSupplier.Context
,ProcessorSupplier.Context
public class TestProcessorContext extends TestProcessorSupplierContext implements Processor.Context
Processor.Context
implementation suitable to be used in tests.- Since:
- 3.0
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TestProcessorContext()
Constructor with default values. -
Method Summary
Modifier and Type Method 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.protected String
loggerName()
TestProcessorContext
setGlobalProcessorIndex(int globalProcessorIndex)
Set the global processor indexTestProcessorContext
setJetInstance(JetInstance jetInstance)
Sets the jet instance.TestProcessorContext
setLocalParallelism(int localParallelism)
Sets local parallelism.TestProcessorContext
setLocalProcessorIndex(int localProcessorIndex)
Set the local processor indexTestProcessorContext
setLogger(ILogger logger)
Sets the logger.TestProcessorContext
setManagedContext(ManagedContext managedContext)
Sets theManagedContext
TestProcessorContext
setProcessingGuarantee(ProcessingGuarantee processingGuarantee)
Sets the processing guarantee.TestProcessorContext
setTotalParallelism(int totalParallelism)
Sets the total parallelism.TestProcessorContext
setVertexName(String vertexName)
Sets the vertex name.Methods inherited from class com.hazelcast.jet.core.test.TestProcessorSupplierContext
addFile, attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile, setMemberIndex
Methods inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
executionId, jetInstance, jobConfig, jobId, localParallelism, logger, memberCount, processingGuarantee, setExecutionId, setJobConfig, setJobId, totalParallelism, vertexName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.hazelcast.jet.core.ProcessorMetaSupplier.Context
executionId, jetInstance, jobConfig, jobId, localParallelism, memberCount, processingGuarantee, snapshottingEnabled, totalParallelism, vertexName
Methods inherited from interface com.hazelcast.jet.core.ProcessorSupplier.Context
attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile
-
Constructor Details
-
TestProcessorContext
public TestProcessorContext()Constructor with default values.
-
-
Method Details
-
localProcessorIndex
public int localProcessorIndex()Description copied from interface:Processor.Context
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]
.- Specified by:
localProcessorIndex
in interfaceProcessor.Context
-
globalProcessorIndex
public int globalProcessorIndex()Description copied from interface:Processor.Context
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]
. For example if there are 2 members in the cluster and local parallelism is 4, the processors on the 1st cluster member will have indexes 0..3 and on the second member they will have indexes 4..7.- Specified by:
globalProcessorIndex
in interfaceProcessor.Context
-
setLocalProcessorIndex
Set the local processor index -
setGlobalProcessorIndex
Set the global processor index -
setLogger
Description copied from class:TestProcessorMetaSupplierContext
Sets the logger.- Overrides:
setLogger
in classTestProcessorSupplierContext
-
setJetInstance
Description copied from class:TestProcessorMetaSupplierContext
Sets the jet instance.- Overrides:
setJetInstance
in classTestProcessorSupplierContext
-
setTotalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets the total parallelism.- Overrides:
setTotalParallelism
in classTestProcessorSupplierContext
-
setLocalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets local parallelism.- Overrides:
setLocalParallelism
in classTestProcessorSupplierContext
-
setVertexName
Description copied from class:TestProcessorMetaSupplierContext
Sets the vertex name.- Overrides:
setVertexName
in classTestProcessorSupplierContext
-
setProcessingGuarantee
@Nonnull public TestProcessorContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)Description copied from class:TestProcessorMetaSupplierContext
Sets the processing guarantee.- Overrides:
setProcessingGuarantee
in classTestProcessorSupplierContext
-
setManagedContext
Description copied from class:TestProcessorSupplierContext
Sets theManagedContext
- Overrides:
setManagedContext
in classTestProcessorSupplierContext
-
loggerName
- Overrides:
loggerName
in classTestProcessorSupplierContext
-