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,com.hazelcast.jet.impl.execution.init.Contexts.InternalProcSupplierCtx
Processor.Context implementation suitable to be used in tests.- Since:
- Jet 3.0
-
Field Summary
Fields inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the processor among all the processors created for this vertex on all nodes: it's a unique cluster-wide index.intReturns 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 StringsetGlobalProcessorIndex(int globalProcessorIndex) Set the global processor indexsetHazelcastInstance(HazelcastInstance instance) Sets the Hazelcast instance.setIsLightJob(boolean isLightJob) Sets the isLightJob flag.setJobConfig(JobConfig jobConfig) Sets the config for the job.setLocalParallelism(int localParallelism) Sets local parallelism.setLocalProcessorIndex(int localProcessorIndex) Set the local processor indexSets the logger.setManagedContext(ManagedContext managedContext) Sets theManagedContextsetPartitionAssignment(Map<Address, int[]> partitionAssignment) Sets the partition assignment.setProcessingGuarantee(ProcessingGuarantee processingGuarantee) Sets the processing guarantee.setTotalParallelism(int totalParallelism) Sets the total parallelism.setVertexName(String vertexName) Sets the vertex name.Methods inherited from class com.hazelcast.jet.core.test.TestProcessorSupplierContext
addFile, attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile, serializationService, setMemberIndexMethods inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
checkPermission, classLoader, dataConnectionService, executionId, getNodeEngine, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, logger, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, setClassLoader, setExecutionId, setJobId, setMaxProcessorAccumulatedRecords, totalParallelism, vertexNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hazelcast.jet.core.Processor.Context
logger, processorPartitionsMethods inherited from interface com.hazelcast.jet.core.ProcessorMetaSupplier.Context
checkPermission, classLoader, dataConnectionService, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, snapshottingEnabled, totalParallelism, vertexNameMethods inherited from interface com.hazelcast.jet.core.ProcessorSupplier.Context
attachedDirectory, attachedFile, managedContext, memberIndex, memberPartitions, recreateAttachedDirectory, recreateAttachedFile
-
Constructor Details
-
TestProcessorContext
public TestProcessorContext()Constructor with default values.
-
-
Method Details
-
localProcessorIndex
public int localProcessorIndex()Description copied from interface:Processor.ContextReturns 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:
localProcessorIndexin interfaceProcessor.Context
-
globalProcessorIndex
public int globalProcessorIndex()Description copied from interface:Processor.ContextReturns 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:
globalProcessorIndexin interfaceProcessor.Context
-
setLocalProcessorIndex
Set the local processor index -
setGlobalProcessorIndex
Set the global processor index -
setLogger
Description copied from class:TestProcessorMetaSupplierContextSets the logger.- Overrides:
setLoggerin classTestProcessorSupplierContext
-
setHazelcastInstance
Description copied from class:TestProcessorMetaSupplierContextSets the Hazelcast instance.- Overrides:
setHazelcastInstancein classTestProcessorSupplierContext
-
setJobConfig
Description copied from class:TestProcessorMetaSupplierContextSets the config for the job.- Overrides:
setJobConfigin classTestProcessorSupplierContext
-
setTotalParallelism
Description copied from class:TestProcessorMetaSupplierContextSets the total parallelism.- Overrides:
setTotalParallelismin classTestProcessorSupplierContext
-
setLocalParallelism
Description copied from class:TestProcessorMetaSupplierContextSets local parallelism.- Overrides:
setLocalParallelismin classTestProcessorSupplierContext
-
setVertexName
Description copied from class:TestProcessorMetaSupplierContextSets the vertex name.- Overrides:
setVertexNamein classTestProcessorSupplierContext
-
setProcessingGuarantee
@Nonnull public TestProcessorContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee) Description copied from class:TestProcessorMetaSupplierContextSets the processing guarantee.- Overrides:
setProcessingGuaranteein classTestProcessorSupplierContext
-
setIsLightJob
Description copied from class:TestProcessorMetaSupplierContextSets the isLightJob flag.- Overrides:
setIsLightJobin classTestProcessorSupplierContext
-
setPartitionAssignment
Description copied from class:TestProcessorMetaSupplierContextSets the partition assignment.- Overrides:
setPartitionAssignmentin classTestProcessorSupplierContext
-
setManagedContext
Description copied from class:TestProcessorSupplierContextSets theManagedContext- Overrides:
setManagedContextin classTestProcessorSupplierContext
-
loggerName
- Overrides:
loggerNamein classTestProcessorSupplierContext
-