public class TestProcessorContext extends TestProcessorSupplierContext implements Processor.Context
Processor.Context implementation suitable to be used in tests.logger| Constructor and Description |
|---|
TestProcessorContext()
Constructor with default values.
|
| 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.
|
protected String |
loggerName() |
TestProcessorContext |
setGlobalProcessorIndex(int globalProcessorIndex)
Set the global processor index
|
TestProcessorContext |
setHazelcastInstance(HazelcastInstance instance)
Sets the Hazelcast instance.
|
TestProcessorContext |
setIsLightJob(boolean isLightJob)
Sets the isLightJob flag.
|
TestProcessorContext |
setJobConfig(JobConfig jobConfig)
Sets the config for the job.
|
TestProcessorContext |
setLocalParallelism(int localParallelism)
Sets local parallelism.
|
TestProcessorContext |
setLocalProcessorIndex(int localProcessorIndex)
Set the local processor index
|
TestProcessorContext |
setLogger(ILogger logger)
Sets the logger.
|
TestProcessorContext |
setManagedContext(ManagedContext managedContext)
Sets the
ManagedContext |
TestProcessorContext |
setPartitionAssignment(Map<Address,int[]> partitionAssignment)
Sets the partition assignment.
|
TestProcessorContext |
setProcessingGuarantee(ProcessingGuarantee processingGuarantee)
Sets the processing guarantee.
|
TestProcessorContext |
setTotalParallelism(int totalParallelism)
Sets the total parallelism.
|
TestProcessorContext |
setVertexName(String vertexName)
Sets the vertex name.
|
addFile, attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile, setMemberIndexclassLoader, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, logger, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, setClassLoader, setExecutionId, setJobId, setMaxProcessorAccumulatedRecords, totalParallelism, vertexNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogger, processorPartitionsattachedDirectory, attachedFile, managedContext, memberIndex, memberPartitions, recreateAttachedDirectory, recreateAttachedFileclassLoader, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, snapshottingEnabled, totalParallelism, vertexNamepublic TestProcessorContext()
public int localProcessorIndex()
Processor.Context
The value is in the range [0...localParallelism-1].
localProcessorIndex in interface Processor.Contextpublic int globalProcessorIndex()
Processor.Context
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.
globalProcessorIndex in interface Processor.Contextpublic TestProcessorContext setLocalProcessorIndex(int localProcessorIndex)
public TestProcessorContext setGlobalProcessorIndex(int globalProcessorIndex)
@Nonnull public TestProcessorContext setLogger(@Nonnull ILogger logger)
TestProcessorMetaSupplierContextsetLogger in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setHazelcastInstance(@Nonnull HazelcastInstance instance)
TestProcessorMetaSupplierContextsetHazelcastInstance in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setJobConfig(@Nonnull JobConfig jobConfig)
TestProcessorMetaSupplierContextsetJobConfig in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setTotalParallelism(int totalParallelism)
TestProcessorMetaSupplierContextsetTotalParallelism in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setLocalParallelism(int localParallelism)
TestProcessorMetaSupplierContextsetLocalParallelism in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setVertexName(@Nonnull String vertexName)
TestProcessorMetaSupplierContextsetVertexName in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)
TestProcessorMetaSupplierContextsetProcessingGuarantee in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setIsLightJob(boolean isLightJob)
TestProcessorMetaSupplierContextsetIsLightJob in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setPartitionAssignment(Map<Address,int[]> partitionAssignment)
TestProcessorMetaSupplierContextsetPartitionAssignment in class TestProcessorSupplierContext@Nonnull public TestProcessorContext setManagedContext(@Nonnull ManagedContext managedContext)
TestProcessorSupplierContextManagedContextsetManagedContext in class TestProcessorSupplierContextprotected String loggerName()
loggerName in class TestProcessorSupplierContextCopyright © 2023 Hazelcast, Inc.. All rights reserved.