public class TestProcessorSupplierContext extends TestProcessorMetaSupplierContext implements ProcessorSupplier.Context
ProcessorSupplier.Context
suitable to be used
in tests.logger
Constructor and Description |
---|
TestProcessorSupplierContext() |
Modifier and Type | Method and Description |
---|---|
TestProcessorSupplierContext |
addFile(String id,
File file)
Add an attached file or folder.
|
File |
attachedDirectory(String id)
Uses the supplied ID to look up a directory you attached to the current
Jet job.
|
File |
attachedFile(String id)
Uses the supplied ID to look up a file you attached to the current Jet
job.
|
protected String |
loggerName() |
ManagedContext |
managedContext()
Returns
ManagedContext associated with this job. |
int |
memberIndex()
Returns the index of the member among all the members that run this
job: it's a unique cluster-wide index.
|
File |
recreateAttachedDirectory(String id)
Behaves like
ProcessorSupplier.Context.attachedDirectory(java.lang.String) , but if the directory already
exists, it deletes and recreates all its contents. |
File |
recreateAttachedFile(String id)
Behaves like
ProcessorSupplier.Context.attachedFile(java.lang.String) , but if the file already exists, it
deletes and recreates it. |
TestProcessorSupplierContext |
setHazelcastInstance(HazelcastInstance instance)
Sets the Hazelcast instance.
|
TestProcessorSupplierContext |
setIsLightJob(boolean isLightJob)
Sets the isLightJob flag.
|
TestProcessorSupplierContext |
setJobConfig(JobConfig jobConfig)
Sets the config for the job.
|
TestProcessorSupplierContext |
setLocalParallelism(int localParallelism)
Sets local parallelism.
|
TestProcessorSupplierContext |
setLogger(ILogger logger)
Sets the logger.
|
TestProcessorSupplierContext |
setManagedContext(ManagedContext managedContext)
Sets the
ManagedContext |
TestProcessorSupplierContext |
setMemberIndex(int memberIndex)
Sets the member index
|
TestProcessorSupplierContext |
setPartitionAssignment(Map<Address,int[]> partitionAssignment)
Sets the partition assignment.
|
TestProcessorSupplierContext |
setProcessingGuarantee(ProcessingGuarantee processingGuarantee)
Sets the processing guarantee.
|
TestProcessorSupplierContext |
setTotalParallelism(int totalParallelism)
Sets the total parallelism.
|
TestProcessorSupplierContext |
setVertexName(String vertexName)
Sets the vertex name.
|
classLoader, 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, memberPartitions
classLoader, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, snapshottingEnabled, totalParallelism, vertexName
@Nonnull public TestProcessorSupplierContext setLogger(@Nonnull ILogger logger)
TestProcessorMetaSupplierContext
setLogger
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setHazelcastInstance(@Nonnull HazelcastInstance instance)
TestProcessorMetaSupplierContext
setHazelcastInstance
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setJobConfig(@Nonnull JobConfig jobConfig)
TestProcessorMetaSupplierContext
setJobConfig
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setVertexName(@Nonnull String vertexName)
TestProcessorMetaSupplierContext
setVertexName
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setTotalParallelism(int totalParallelism)
TestProcessorMetaSupplierContext
setTotalParallelism
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setLocalParallelism(int localParallelism)
TestProcessorMetaSupplierContext
setLocalParallelism
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)
TestProcessorMetaSupplierContext
setProcessingGuarantee
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setIsLightJob(boolean isLightJob)
TestProcessorMetaSupplierContext
setIsLightJob
in class TestProcessorMetaSupplierContext
@Nonnull public TestProcessorSupplierContext setPartitionAssignment(Map<Address,int[]> partitionAssignment)
TestProcessorMetaSupplierContext
setPartitionAssignment
in class TestProcessorMetaSupplierContext
public int memberIndex()
ProcessorSupplier.Context
The value is in the range [0...memberCount-1]
.
memberIndex
in interface ProcessorSupplier.Context
@Nonnull public File attachedDirectory(@Nonnull String id)
ProcessorSupplier.Context
attachedDirectory
in interface ProcessorSupplier.Context
id
- the ID you used in a previous JobConfig.attachDirectory(java.net.URL)
call@Nonnull public File recreateAttachedDirectory(@Nonnull String id)
ProcessorSupplier.Context
ProcessorSupplier.Context.attachedDirectory(java.lang.String)
, but if the directory already
exists, it deletes and recreates all its contents.recreateAttachedDirectory
in interface ProcessorSupplier.Context
@Nonnull public File attachedFile(@Nonnull String id)
ProcessorSupplier.Context
attachedFile
in interface ProcessorSupplier.Context
id
- the ID you used in a previous JobConfig.attachFile(java.net.URL)
call@Nonnull public File recreateAttachedFile(@Nonnull String id)
ProcessorSupplier.Context
ProcessorSupplier.Context.attachedFile(java.lang.String)
, but if the file already exists, it
deletes and recreates it.recreateAttachedFile
in interface ProcessorSupplier.Context
@Nonnull public ManagedContext managedContext()
ProcessorSupplier.Context
ManagedContext
associated with this job.managedContext
in interface ProcessorSupplier.Context
@Nonnull public TestProcessorSupplierContext addFile(@Nonnull String id, @Nonnull File file)
@Nonnull public TestProcessorSupplierContext setMemberIndex(int memberIndex)
@Nonnull public TestProcessorSupplierContext setManagedContext(@Nonnull ManagedContext managedContext)
ManagedContext
protected String loggerName()
loggerName
in class TestProcessorMetaSupplierContext
Copyright © 2024 Hazelcast, Inc.. All rights reserved.