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:
- Jet 3.0
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckPermission(Permission permission) Check if the current Subject has the given permission granted (or implied).Processor classloader configured viaJobConfig.addCustomClasspath(String, String)A service to accessDataConnections in processors.longReturns the job execution ID.com.hazelcast.spi.impl.NodeEngineImplReturns the current Hazelcast instance.booleanReturns if this job runs as a light job, seeJetService.newLightJob(Pipeline).Deprecated.Returns theJobConfig.longjobId()Returns the job ID.intReturns the number of processors that eachProcessorSupplierwill be asked to create once deserialized on each member.logger()Returns a logger for the associatedProcessorMetaSupplier.protected StringlongReturns the maximum number of records that can be accumulated by any singleProcessor.intReturns the number of members running this job.Returns the partition assignment used by this job.Returns the guarantee for current job.setClassLoader(ClassLoader classLoader) setExecutionId(long executionId) Sets the execution ID.setHazelcastInstance(HazelcastInstance instance) Sets the Hazelcast instance.setIsLightJob(boolean isLightJob) Sets the isLightJob flag.setJobConfig(JobConfig jobConfig) Sets the config for the job.setJobId(long jobId) Sets the job ID.setLocalParallelism(int localParallelism) Sets local parallelism.Sets the logger.voidsetMaxProcessorAccumulatedRecords(long maxProcessorAccumulatedRecords) setPartitionAssignment(Map<Address, int[]> partitionAssignment) Sets the partition assignment.setProcessingGuarantee(ProcessingGuarantee processingGuarantee) Sets the processing guarantee.setTotalParallelism(int totalParallelism) Sets the total parallelism.setVertexName(String vertexName) Sets the vertex name.intReturns the total number ofProcessors that will be created across the cluster.Returns the name of the associated vertex.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hazelcast.jet.core.ProcessorMetaSupplier.ContextsnapshottingEnabled
- 
Field Details- 
logger
 
- 
- 
Constructor Details- 
TestProcessorMetaSupplierContextpublic TestProcessorMetaSupplierContext()
 
- 
- 
Method Details- 
hazelcastInstanceDescription copied from interface:ProcessorMetaSupplier.ContextReturns the current Hazelcast instance.- Specified by:
- hazelcastInstancein interface- ProcessorMetaSupplier.Context
 
- 
jetInstanceDeprecated.Description copied from interface:ProcessorMetaSupplier.ContextReturns the current Jet instance.- Specified by:
- jetInstancein interface- ProcessorMetaSupplier.Context
 
- 
setHazelcastInstance@Nonnull public TestProcessorMetaSupplierContext setHazelcastInstance(@Nonnull HazelcastInstance instance) Sets the Hazelcast instance.
- 
jobIdpublic long jobId()Description copied from interface:ProcessorMetaSupplier.ContextReturns 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:
- jobIdin interface- ProcessorMetaSupplier.Context
 
- 
setJobIdSets the job ID.
- 
executionIdpublic long executionId()Description copied from interface:ProcessorMetaSupplier.ContextReturns the job execution ID. It's unique for one execution, but changes when the job restarts.- Specified by:
- executionIdin interface- ProcessorMetaSupplier.Context
 
- 
setExecutionIdSets the execution ID.
- 
jobConfigDescription copied from interface:ProcessorMetaSupplier.ContextReturns theJobConfig.- Specified by:
- jobConfigin interface- ProcessorMetaSupplier.Context
 
- 
setJobConfigSets the config for the job.
- 
totalParallelismpublic int totalParallelism()Description copied from interface:ProcessorMetaSupplier.ContextReturns the total number ofProcessors 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:
- totalParallelismin interface- ProcessorMetaSupplier.Context
 
- 
setTotalParallelismSets the total parallelism.
- 
localParallelismpublic int localParallelism()Description copied from interface:ProcessorMetaSupplier.ContextReturns the number of processors that eachProcessorSupplierwill 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:
- localParallelismin interface- ProcessorMetaSupplier.Context
 
- 
setLocalParallelismSets local parallelism.
- 
loggerDescription copied from interface:ProcessorMetaSupplier.ContextReturns a logger for the associatedProcessorMetaSupplier.- Specified by:
- loggerin interface- ProcessorMetaSupplier.Context
 
- 
setLoggerSets the logger.
- 
memberCountpublic int memberCount()Description copied from interface:ProcessorMetaSupplier.ContextReturns 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:
- memberCountin interface- ProcessorMetaSupplier.Context
 
- 
vertexNameDescription copied from interface:ProcessorMetaSupplier.ContextReturns the name of the associated vertex.- Specified by:
- vertexNamein interface- ProcessorMetaSupplier.Context
 
- 
setVertexNameSets the vertex name.
- 
loggerName
- 
processingGuaranteeDescription copied from interface:ProcessorMetaSupplier.ContextReturns the guarantee for current job.- Specified by:
- processingGuaranteein interface- ProcessorMetaSupplier.Context
 
- 
setProcessingGuarantee@Nonnull public TestProcessorMetaSupplierContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee) Sets the processing guarantee.
- 
maxProcessorAccumulatedRecordspublic long maxProcessorAccumulatedRecords()Description copied from interface:ProcessorMetaSupplier.ContextReturns the maximum number of records that can be accumulated by any singleProcessor. The returned value is strictly positive (>=1).- Specified by:
- maxProcessorAccumulatedRecordsin interface- ProcessorMetaSupplier.Context
 
- 
setMaxProcessorAccumulatedRecordspublic void setMaxProcessorAccumulatedRecords(long maxProcessorAccumulatedRecords) 
- 
isLightJobpublic boolean isLightJob()Description copied from interface:ProcessorMetaSupplier.ContextReturns if this job runs as a light job, seeJetService.newLightJob(Pipeline).- Specified by:
- isLightJobin interface- ProcessorMetaSupplier.Context
 
- 
setIsLightJobSets the isLightJob flag.
- 
partitionAssignmentDescription copied from interface:ProcessorMetaSupplier.ContextReturns the partition assignment used by this job. This is the assignment partitioned edges will use and the assignment processors dealing with Hazelcast data structures should use. Each mapped partitions id array must be sorted.- Specified by:
- partitionAssignmentin interface- ProcessorMetaSupplier.Context
 
- 
setPartitionAssignment@Nonnull public TestProcessorMetaSupplierContext setPartitionAssignment(Map<Address, int[]> partitionAssignment) Sets the partition assignment.
- 
classLoaderDescription copied from interface:ProcessorMetaSupplier.ContextProcessor classloader configured viaJobConfig.addCustomClasspath(String, String)- Specified by:
- classLoaderin interface- ProcessorMetaSupplier.Context
- Returns:
- processor classloader, null if no custom classpath elements are configured
 
- 
dataConnectionServiceDescription copied from interface:ProcessorMetaSupplier.ContextA service to accessDataConnections in processors.- Specified by:
- dataConnectionServicein interface- ProcessorMetaSupplier.Context
 
- 
getNodeEnginepublic com.hazelcast.spi.impl.NodeEngineImpl getNodeEngine()
- 
setClassLoader
- 
checkPermissionDescription copied from interface:ProcessorMetaSupplier.ContextCheck if the current Subject has the given permission granted (or implied).- Specified by:
- checkPermissionin interface- ProcessorMetaSupplier.Context
- Parameters:
- permission- Permission to be checked
- Throws:
- AccessControlException- when the security is enabled and the checked permission is not implied for the current- Subject
 
 
-