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 |
setIsLightJob(boolean isLightJob)
Sets the isLightJob flag.
|
TestProcessorContext |
setJetInstance(JetInstance jetInstance)
Sets the jet instance.
|
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 |
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
executionId, isLightJob, jetInstance, jobConfig, jobId, localParallelism, logger, maxProcessorAccumulatedRecords, memberCount, processingGuarantee, setExecutionId, setJobId, setMaxProcessorAccumulatedRecords, totalParallelism, vertexName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logger
attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile
executionId, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, 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 setJetInstance(@Nonnull JetInstance jetInstance)
TestProcessorMetaSupplierContext
setJetInstance
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 setManagedContext(@Nonnull ManagedContext managedContext)
TestProcessorSupplierContext
ManagedContext
setManagedContext
in class TestProcessorSupplierContext
protected String loggerName()
loggerName
in class TestProcessorSupplierContext
Copyright © 2021 Hazelcast, Inc.. All rights reserved.