public class TestProcessorMetaSupplierContext extends Object implements ProcessorMetaSupplier.Context
ProcessorMetaSupplier.Context
implementation suitable to be used
in tests.Constructor and Description |
---|
TestProcessorMetaSupplierContext() |
Modifier and Type | Method and Description |
---|---|
JetInstance |
jetInstance()
Returns the current Jet instance.
|
int |
localParallelism()
Returns the number of processors that each
ProcessorSupplier
will be asked to create once deserialized on each member. |
ILogger |
logger()
Returns a logger for the associated
ProcessorMetaSupplier . |
protected String |
loggerName() |
int |
memberCount()
Returns the number of members running this job.
|
TestProcessorMetaSupplierContext |
setJetInstance(JetInstance jetInstance)
Set the jet instance.
|
TestProcessorMetaSupplierContext |
setLocalParallelism(int localParallelism)
Set local parallelism.
|
TestProcessorMetaSupplierContext |
setLogger(ILogger logger)
Set the logger.
|
TestProcessorMetaSupplierContext |
setTotalParallelism(int totalParallelism)
Set total parallelism.
|
TestProcessorMetaSupplierContext |
setVertexName(String vertexName)
Set the vertex name.
|
int |
totalParallelism()
Returns the total number of
Processor s that will be created
across the cluster. |
String |
vertexName()
Returns the name of the associated vertex.
|
protected ILogger logger
public JetInstance jetInstance()
ProcessorMetaSupplier.Context
jetInstance
in interface ProcessorMetaSupplier.Context
@Nonnull public TestProcessorMetaSupplierContext setJetInstance(@Nonnull JetInstance jetInstance)
public int totalParallelism()
ProcessorMetaSupplier.Context
Processor
s that will be created
across the cluster. This number remains stable for entire job
execution. It is equal to ProcessorMetaSupplier.Context.memberCount()
* ProcessorMetaSupplier.Context.localParallelism()
.totalParallelism
in interface ProcessorMetaSupplier.Context
@Nonnull public TestProcessorMetaSupplierContext setTotalParallelism(int totalParallelism)
@Nonnull public ILogger logger()
ProcessorMetaSupplier.Context
ProcessorMetaSupplier
.logger
in interface ProcessorMetaSupplier.Context
public TestProcessorMetaSupplierContext setLogger(@Nonnull ILogger logger)
public int localParallelism()
ProcessorMetaSupplier.Context
ProcessorSupplier
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.localParallelism
in interface ProcessorMetaSupplier.Context
@Nonnull public TestProcessorMetaSupplierContext setLocalParallelism(int localParallelism)
public int memberCount()
ProcessorMetaSupplier.Context
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.
memberCount
in interface ProcessorMetaSupplier.Context
@Nonnull public String vertexName()
ProcessorMetaSupplier.Context
vertexName
in interface ProcessorMetaSupplier.Context
@Nonnull public TestProcessorMetaSupplierContext setVertexName(@Nonnull String vertexName)
protected String loggerName()
Copyright © 2018 Hazelcast, Inc.. All rights reserved.