Package com.hazelcast.jet.core.test
Class TestProcessorMetaSupplierContext
java.lang.Object
com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
- All Implemented Interfaces:
ProcessorMetaSupplier.Context
- Direct Known Subclasses:
TestProcessorSupplierContext
public class TestProcessorMetaSupplierContext extends Object implements ProcessorMetaSupplier.Context
ProcessorMetaSupplier.Context
implementation suitable to be used
in tests.- Since:
- 3.0
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TestProcessorMetaSupplierContext()
-
Method Summary
Modifier and Type Method Description long
executionId()
Returns the job execution ID.JetInstance
jetInstance()
Returns the current Jet instance.JobConfig
jobConfig()
Returns theJobConfig
.long
jobId()
Returns the job ID.int
localParallelism()
Returns the number of processors that eachProcessorSupplier
will be asked to create once deserialized on each member.ILogger
logger()
Returns a logger for the associatedProcessorMetaSupplier
.protected String
loggerName()
int
memberCount()
Returns the number of members running this job.ProcessingGuarantee
processingGuarantee()
Returns the guarantee for current job.TestProcessorMetaSupplierContext
setExecutionId(long executionId)
Sets the execution ID.TestProcessorMetaSupplierContext
setJetInstance(JetInstance jetInstance)
Sets the jet instance.TestProcessorMetaSupplierContext
setJobConfig(JobConfig jobConfig)
Sets the job name.TestProcessorMetaSupplierContext
setJobId(long jobId)
Sets the job ID.TestProcessorMetaSupplierContext
setLocalParallelism(int localParallelism)
Sets local parallelism.TestProcessorMetaSupplierContext
setLogger(ILogger logger)
Sets the logger.TestProcessorMetaSupplierContext
setProcessingGuarantee(ProcessingGuarantee processingGuarantee)
Sets the processing guarantee.TestProcessorMetaSupplierContext
setTotalParallelism(int totalParallelism)
Sets the total parallelism.TestProcessorMetaSupplierContext
setVertexName(String vertexName)
Sets the vertex name.int
totalParallelism()
Returns the total number ofProcessor
s that will be created across the cluster.String
vertexName()
Returns the name of the associated vertex.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
snapshottingEnabled
-
Field Details
-
Constructor Details
-
TestProcessorMetaSupplierContext
public TestProcessorMetaSupplierContext()
-
-
Method Details
-
jetInstance
Description copied from interface:ProcessorMetaSupplier.Context
Returns the current Jet instance.- Specified by:
jetInstance
in interfaceProcessorMetaSupplier.Context
-
setJetInstance
Sets the jet instance. -
jobId
public long jobId()Description copied from interface:ProcessorMetaSupplier.Context
Returns the job ID. Job id is unique for job submission and doesn't change when the job restarts. It's also unique for all running and archived jobs.- Specified by:
jobId
in interfaceProcessorMetaSupplier.Context
-
setJobId
Sets the job ID. -
executionId
public long executionId()Description copied from interface:ProcessorMetaSupplier.Context
Returns the job execution ID. It's unique for one execution, but changes when the job restarts.- Specified by:
executionId
in interfaceProcessorMetaSupplier.Context
-
setExecutionId
Sets the execution ID. -
jobConfig
Description copied from interface:ProcessorMetaSupplier.Context
Returns theJobConfig
.- Specified by:
jobConfig
in interfaceProcessorMetaSupplier.Context
-
setJobConfig
Sets the job name. -
totalParallelism
public int totalParallelism()Description copied from interface:ProcessorMetaSupplier.Context
Returns the total number ofProcessor
s that will be created across the cluster. This number remains stable for entire job execution. It is equal toProcessorMetaSupplier.Context.memberCount()
*ProcessorMetaSupplier.Context.localParallelism()
.- Specified by:
totalParallelism
in interfaceProcessorMetaSupplier.Context
-
setTotalParallelism
Sets the total parallelism. -
localParallelism
public int localParallelism()Description copied from interface:ProcessorMetaSupplier.Context
Returns the number of processors that eachProcessorSupplier
will be asked to create once deserialized on each member. All members have equal local parallelism. The count doesn't change unless the job restarts.- Specified by:
localParallelism
in interfaceProcessorMetaSupplier.Context
-
setLocalParallelism
Sets local parallelism. -
logger
Description copied from interface:ProcessorMetaSupplier.Context
Returns a logger for the associatedProcessorMetaSupplier
.- Specified by:
logger
in interfaceProcessorMetaSupplier.Context
-
setLogger
Sets the logger. -
memberCount
public int memberCount()Description copied from interface:ProcessorMetaSupplier.Context
Returns the number of members running this job.Note that the value might be lower than current member count if members were added after the job started. The count doesn't change unless the job restarts.
- Specified by:
memberCount
in interfaceProcessorMetaSupplier.Context
-
vertexName
Description copied from interface:ProcessorMetaSupplier.Context
Returns the name of the associated vertex.- Specified by:
vertexName
in interfaceProcessorMetaSupplier.Context
-
setVertexName
Sets the vertex name. -
loggerName
-
processingGuarantee
Description copied from interface:ProcessorMetaSupplier.Context
Returns the guarantee for current job.- Specified by:
processingGuarantee
in interfaceProcessorMetaSupplier.Context
-
setProcessingGuarantee
@Nonnull public TestProcessorMetaSupplierContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)Sets the processing guarantee.
-