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, setMemberIndex
checkPermission, classLoader, dataConnectionService, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, logger, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, setClassLoader, setExecutionId, setJobId, setMaxProcessorAccumulatedRecords, totalParallelism, vertexName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logger, processorPartitions
attachedDirectory, attachedFile, managedContext, memberIndex, memberPartitions, recreateAttachedDirectory, recreateAttachedFile
checkPermission, classLoader, dataConnectionService, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, snapshottingEnabled, totalParallelism, vertexName
public TestProcessorContext()
public int localProcessorIndex()
Processor.Context
The value is in the range [0...localParallelism-1]
.
localProcessorIndex
in interface Processor.Context
public 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.Context
public TestProcessorContext setLocalProcessorIndex(int localProcessorIndex)
public TestProcessorContext setGlobalProcessorIndex(int globalProcessorIndex)
@Nonnull public TestProcessorContext setLogger(@Nonnull ILogger logger)
TestProcessorMetaSupplierContext
setLogger
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setHazelcastInstance(@Nonnull HazelcastInstance instance)
TestProcessorMetaSupplierContext
setHazelcastInstance
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setJobConfig(@Nonnull JobConfig jobConfig)
TestProcessorMetaSupplierContext
setJobConfig
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setTotalParallelism(int totalParallelism)
TestProcessorMetaSupplierContext
setTotalParallelism
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setLocalParallelism(int localParallelism)
TestProcessorMetaSupplierContext
setLocalParallelism
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setVertexName(@Nonnull String vertexName)
TestProcessorMetaSupplierContext
setVertexName
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)
TestProcessorMetaSupplierContext
setProcessingGuarantee
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setIsLightJob(boolean isLightJob)
TestProcessorMetaSupplierContext
setIsLightJob
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setPartitionAssignment(Map<Address,int[]> partitionAssignment)
TestProcessorMetaSupplierContext
setPartitionAssignment
in class TestProcessorSupplierContext
@Nonnull public TestProcessorContext setManagedContext(@Nonnull ManagedContext managedContext)
TestProcessorSupplierContext
ManagedContext
setManagedContext
in class TestProcessorSupplierContext
protected String loggerName()
loggerName
in class TestProcessorSupplierContext
Copyright © 2024 Hazelcast, Inc.. All rights reserved.