Class EventProcessorProperties.ProcessorSettings
java.lang.Object
org.axonframework.extension.springboot.EventProcessorProperties.ProcessorSettings
- All Implemented Interfaces:
EventProcessorSettings,EventProcessorSettings.PooledEventProcessorSettings,EventProcessorSettings.SubscribingEventProcessorSettings
- Enclosing class:
EventProcessorProperties
public static class EventProcessorProperties.ProcessorSettings
extends Object
implements EventProcessorSettings.PooledEventProcessorSettings, EventProcessorSettings.SubscribingEventProcessorSettings
Processor settings.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.axonframework.extension.spring.config.EventProcessorSettings
EventProcessorSettings.MapWrapper, EventProcessorSettings.PooledEventProcessorSettings, EventProcessorSettings.ProcessorMode, EventProcessorSettings.SubscribingEventProcessorSettings -
Field Summary
Fields inherited from interface org.axonframework.extension.spring.config.EventProcessorSettings
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum size of a processing batch.getDlq()Retrieves the AutoConfiguration settings for the sequenced dead letter queue settings.getMode()Returns the type of processor to configure.longReturns the interval between attempts to claim tokens by aStreamingEventProcessor.Returns the time unit used to define tokens claim interval.intReturns the number of initial segments that should be created, if no segments are already present.Retrieves the processor mode.Returns the name of the bean that defines theSequencingPolicyfor this processor.voidsetBatchSize(int batchSize) Sets the maximum size of a processing batch.voidDefines the AutoConfiguration settings for the sequenced dead letter queue.voidsetInitialSegmentCount(int initialSegmentCount) Sets the number of initial segments that should be created, if no segments are already present.voidSets the type of processor that should be configured.voidsetSequencingPolicy(String sequencingPolicy) Sets the name of the bean that defines theSequencingPolicyfor this processor.voidSets the name of the bean that should be used as source for Event Messages.voidsetThreadCount(int threadCount) Sets the number of threads to use to process Events.voidsetTokenClaimInterval(long tokenClaimInterval) Sets the time to wait after a failed attempt to claim any token, before making another attempt.voidsetTokenClaimIntervalTimeUnit(TimeUnit tokenClaimIntervalTimeUnit) Sets the time unit used to defined tokens claim interval.voidsetTokenStore(String tokenStore) Sets the name of the TokenStore bean.source()Returns the name of the bean that should be used as source for Event Messages.intReturns the number of threads to use to process Events, when using aStreamingEventProcessorimplementation.longRetrieves token claim interval.Retrieves the name of the TokenStore bean.
-
Constructor Details
-
ProcessorSettings
public ProcessorSettings()
-
-
Method Details
-
source
Returns the name of the bean that should be used as source for Event Messages. If not provided, theEventBusis used as source.- Specified by:
sourcein interfaceEventProcessorSettings- Returns:
- the name of the bean that should be used as source for Event Messages.
-
setSource
Sets the name of the bean that should be used as source for Event Messages.- Parameters:
source- the name of the bean that should be used as source for Event Messages.
-
getMode
Returns the type of processor to configure. Defaults toEventProcessorProperties.Mode.POOLED.- Returns:
- the type of processor to configure.
-
processorMode
Retrieves the processor mode.- Specified by:
processorModein interfaceEventProcessorSettings- Specified by:
processorModein interfaceEventProcessorSettings.PooledEventProcessorSettings- Specified by:
processorModein interfaceEventProcessorSettings.SubscribingEventProcessorSettings- Returns:
- pooled-streaming or subscribed mode, falls back to pooled-streaming.
-
setMode
Sets the type of processor that should be configured. Defaults toEventProcessorProperties.Mode.POOLED.- Parameters:
mode- the type of processor that should be configured.
-
initialSegmentCount
public int initialSegmentCount()Returns the number of initial segments that should be created, if no segments are already present. Defaults to 16 for aPooledStreamingEventProcessor.- Specified by:
initialSegmentCountin interfaceEventProcessorSettings.PooledEventProcessorSettings- Returns:
- the number of initial segments that should be created.
-
setInitialSegmentCount
public void setInitialSegmentCount(int initialSegmentCount) Sets the number of initial segments that should be created, if no segments are already present. Defaults to 16 for aPooledStreamingEventProcessor.- Parameters:
initialSegmentCount- the number of initial segments that should be created.
-
getTokenClaimInterval
public long getTokenClaimInterval()Returns the interval between attempts to claim tokens by aStreamingEventProcessor. Defaults to 5000 milliseconds.- Returns:
- the interval between attempts to claim tokens by a
StreamingEventProcessor.
-
setTokenClaimInterval
public void setTokenClaimInterval(long tokenClaimInterval) Sets the time to wait after a failed attempt to claim any token, before making another attempt. Defaults to 5000 milliseconds.- Parameters:
tokenClaimInterval- the interval between attempts to claim tokens by aStreamingEventProcessor.
-
getTokenClaimIntervalTimeUnit
Returns the time unit used to define tokens claim interval. Defaults toTimeUnit.MILLISECONDS.- Returns:
- the time unit used to defined tokens claim interval.
-
tokenClaimIntervalInMillis
public long tokenClaimIntervalInMillis()Description copied from interface:EventProcessorSettings.PooledEventProcessorSettingsRetrieves token claim interval.- Specified by:
tokenClaimIntervalInMillisin interfaceEventProcessorSettings.PooledEventProcessorSettings- Returns:
- interval in milliseconds.
-
setTokenClaimIntervalTimeUnit
Sets the time unit used to defined tokens claim interval. It must be a valid value ofTimeUnit. Defaults toTimeUnit.MILLISECONDS.- Parameters:
tokenClaimIntervalTimeUnit- the time unit used to defined tokens claim interval.
-
threadCount
public int threadCount()Returns the number of threads to use to process Events, when using aStreamingEventProcessorimplementation. Defaults to the configured number of initial segments. If this field is not configured, the thread count defaults to 4 for aPooledStreamingEventProcessor.- Specified by:
threadCountin interfaceEventProcessorSettings.PooledEventProcessorSettings- Returns:
- the number of threads to use to process Events.
-
setThreadCount
public void setThreadCount(int threadCount) Sets the number of threads to use to process Events. If this field is not configured, the thread count defaults to 4 for aPooledStreamingEventProcessor.- Parameters:
threadCount- the number of threads to use to process Events.
-
batchSize
public int batchSize()Returns the maximum size of a processing batch. This is the number of events that a processor in "tracking" and "pooled" mode will attempt to read and process within a single Unit of Work / Transaction.- Specified by:
batchSizein interfaceEventProcessorSettings.PooledEventProcessorSettings- Returns:
- the maximum size of a processing batch.
-
setBatchSize
public void setBatchSize(int batchSize) Sets the maximum size of a processing batch. This is the number of events that a processor in "tracking" and "pooled" mode will attempt to read and process within a single Unit of Work / Transaction. Defaults to 1.- Parameters:
batchSize- the maximum size of a processing batch.
-
setTokenStore
Sets the name of the TokenStore bean.- Parameters:
tokenStore- A name of the Spring Bean used for this processor.
-
tokenStore
Retrieves the name of the TokenStore bean.- Specified by:
tokenStorein interfaceEventProcessorSettings.PooledEventProcessorSettings- Returns:
- Name of the token store Spring Bean.
-
sequencingPolicy
Returns the name of the bean that defines theSequencingPolicyfor this processor.- Returns:
- the name of the bean that defines the
SequencingPolicyfor this processor.
-
setSequencingPolicy
Sets the name of the bean that defines theSequencingPolicyfor this processor. TheSequencingPolicydescribes which Events must be handled sequentially, and which can be handled concurrently. Defaults to aSequentialPerAggregatePolicy.- Parameters:
sequencingPolicy- the name of the bean that defines theSequencingPolicyfor this processor.
-
getDlq
Retrieves the AutoConfiguration settings for the sequenced dead letter queue settings.- Returns:
- the AutoConfiguration settings for the sequenced dead letter queue settings.
-
setDlq
Defines the AutoConfiguration settings for the sequenced dead letter queue.- Parameters:
dlq- the sequenced dead letter queue settings for the sequenced dead letter queue.
-