public class AsyncInlineCachingRegionConfigurer<T,ID>
extends java.lang.Object
implements org.springframework.data.gemfire.config.annotation.RegionConfigurer
RegionConfigurer
implementation used to configure a target Region
to use Asynchronous Inline Caching based on the Spring Data Repositories
abstraction.Function
,
Predicate
,
Cache
,
Region
,
AsyncEventListener
,
AsyncEventQueue
,
AsyncEventQueueFactory
,
GatewayEventFilter
,
GatewayEventSubstitutionFilter
,
GatewaySender.OrderPolicy
,
PeerRegionFactoryBean
,
RegionConfigurer
,
CrudRepository
,
RepositoryAsyncEventListener.AsyncEventErrorHandler
Modifier and Type | Field and Description |
---|---|
protected static java.util.function.Predicate<java.lang.String> |
DEFAULT_REGION_BEAN_NAME_PREDICATE |
Constructor and Description |
---|
AsyncInlineCachingRegionConfigurer(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.util.function.Predicate<java.lang.String> regionBeanName)
Constructs a new instance of
AsyncInlineCachingRegionConfigurer initialized with the given
CrudRepository and Predicate identifying the Region on which
Asynchronous Inline Caching will be configured. |
Modifier and Type | Method and Description |
---|---|
AsyncInlineCachingRegionConfigurer<T,ID> |
applyToListener(java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventListener,org.apache.geode.cache.asyncqueue.AsyncEventListener> asyncEventListenerPostProcessor)
Builder method used to configure the given user-defined
Function applied to the framework constructed
and provided AsyncEventListener for post processing. |
AsyncInlineCachingRegionConfigurer<T,ID> |
applyToQueue(java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventQueue,org.apache.geode.cache.asyncqueue.AsyncEventQueue> asyncEventQueuePostProcessor)
Builder method used to configure the given user-defined
Function applied to the framework constructed
and provided AsyncEventQueue for post processing. |
AsyncInlineCachingRegionConfigurer<T,ID> |
applyToQueueFactory(java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory,org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory> asyncEventQueueFactoryPostProcessor)
Builder method used to configure the given user-defined
Function applied to the framework constructed
and provided AsyncEventQueueFactory for post processing. |
void |
configure(java.lang.String beanName,
org.springframework.data.gemfire.PeerRegionFactoryBean<?,?> bean)
Configures the target
Region by name with Asynchronous Inline Caching
functionality. |
static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> |
create(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.util.function.Predicate<java.lang.String> regionBeanName)
Factory method used to construct a new instance of
AsyncInlineCachingRegionConfigurer initialized with
the given Spring Data CrudRepository and Predicate identifying the target Region
on which to configure Asynchronous Inline Caching. |
static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> |
create(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.lang.String regionBeanName)
Factory method used to construct a new instance of
AsyncInlineCachingRegionConfigurer initialized with
the given Spring Data CrudRepository and String identifying the target Region
on which to configure Asynchronous Inline Caching. |
protected java.lang.String |
generateId(java.lang.String regionBeanName)
Generates a new
ID for the AsyncEventQueue . |
protected java.util.function.Predicate<java.lang.String> |
getRegionBeanName()
Gets the
Predicate identifying the Region on which Asynchronous Inline Caching
will be configured. |
protected org.springframework.data.repository.CrudRepository<T,ID> |
getRepository()
Gets the Spring Data
CrudRepository used to perform data access operations on an external data source
triggered cache events and operations on the target Region . |
protected org.apache.geode.cache.asyncqueue.AsyncEventQueue |
newAsyncEventQueue(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory factory,
java.lang.String asyncEventQueueId,
org.apache.geode.cache.asyncqueue.AsyncEventListener listener)
Constructs (creates) a new instance of
AsyncEventQueue using the given AsyncEventQueueFactory
with the given AEQ ID and AsyncEventListener . |
protected org.apache.geode.cache.asyncqueue.AsyncEventQueue |
newAsyncEventQueue(org.apache.geode.cache.Cache peerCache,
java.lang.String regionBeanName)
Constructs a new instance of an
AsyncEventQueue to attach to the target Region configured for
Asynchronous Inline Caching. |
protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory |
newAsyncEventQueueFactory(org.apache.geode.cache.Cache peerCache)
Constructs (creates) a new instance of the
AsyncEventQueueFactory from the given peer
Cache . |
protected org.apache.geode.cache.asyncqueue.AsyncEventListener |
newRepositoryAsyncEventListener()
Constructs a new Apache Geode
AsyncEventListener to register on an AsyncEventQueue attached to
the target Region , which uses the CrudRepository to perform data access operations on an external
backend data source asynchronously when cache events and operations occur on the target Region . |
protected org.apache.geode.cache.asyncqueue.AsyncEventListener |
newRepositoryAsyncEventListener(org.springframework.data.repository.CrudRepository<T,ID> repository)
Constructs a new Apache Geode
AsyncEventListener to register on an AsyncEventQueue attached to
the target Region , which uses the given CrudRepository to perform data access operations on an
external, backend data source asynchronously when cache events and operations occur on the target Region . |
protected org.apache.geode.cache.asyncqueue.AsyncEventListener |
postProcess(org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener)
Applies the user-defined
Function to the framework constructed/provided AsyncEventListener
for post processing. |
protected org.apache.geode.cache.asyncqueue.AsyncEventQueue |
postProcess(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue)
Applies the user-defined
Function to the framework constructed/provided AsyncEventQueue
for post processing. |
protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory |
postProcess(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory)
Applies the user-defined
Function to the framework constructed/provided AsyncEventQueueFactory
for post processing. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withAsyncEventErrorHandler(RepositoryAsyncEventListener.AsyncEventErrorHandler errorHandler)
Builder method used to configure a
RepositoryAsyncEventListener.AsyncEventErrorHandler to handle errors thrown while processing
AsyncEvents in the AsyncEventListener . |
AsyncInlineCachingRegionConfigurer<T,ID> |
withParallelQueue()
Builder method used to enable all
AEQs attached to Regions hosted
and distributed across the cache cluster to process cache events. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withPersistentQueue()
Builder method used to enable the
AsyncEventQueue to persist cache events to disk in order to
preserve unprocessed cache events while offline. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueBatchConflationEnabled()
Builder method used to configure the
AsyncEventQueue to conflate cache events in the queue. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueBatchSize(int batchSize)
Builder method used to configure the
AsyncEventQueue batch size , which determines
the number (i.e. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueBatchTimeInterval(java.time.Duration batchTimeInterval)
Builder method used to configure the
AsyncEventQueue batch time interval determining
when the AEQ listener will be trigger before the number of cache events reaches any set size. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueDiskStore(java.lang.String diskStoreName)
Builder method used to configure the
name of the DiskStore used by
the AsyncEventQueue to persist or overflow cache events. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueDiskSynchronizationEnabled()
Builder method used to configure the
AsyncEventQueue to perform all disk write operations synchronously. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueDispatcherThreadCount(int dispatcherThreadCount)
Builder method to configure the number of
Threads to process the cache events (contents)
in the AsyncEventQueue when the queue is parallel. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueEventDispatchingPaused()
Builder method used to configure whether the
AsyncEventQueue is currently processing cache events
or is paused. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueEventFilters(java.util.List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters)
Builder method to configure the
AsyncEventQueue with a List of
GatewayEventFilters to filter cache events sent to the configured AEQ listener. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueEventSubstitutionFilter(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID,T> eventSubstitutionFilter)
Builder method used to configure the
AsyncEventQueue with a
cache event substitution filter used to replace (or "substitute")
the original cache entry event value enqueued in the AEQ. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueForwardedExpirationDestroyEvents()
Builder method used to configure whether cache
Region entry destroyed events due to expiration
are forwarded to the AsyncEventQueue . |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueMaxMemory(int maximumMemory)
Builder method used to configure the maximum JVM Heap memory in megabytes used by the
AsyncEventQueue . |
AsyncInlineCachingRegionConfigurer<T,ID> |
withQueueOrderPolicy(org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy)
Builder method used to configure the
AsyncEventQueue order of processing for cache events when the AEQ
is serial and the AEQ is using multiple dispatcher threads. |
AsyncInlineCachingRegionConfigurer<T,ID> |
withSerialQueue()
Builder method used to enable a single
AEQ attached to a Region
(possibly) hosted and distributed across the cache cluster to process cache events. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected static final java.util.function.Predicate<java.lang.String> DEFAULT_REGION_BEAN_NAME_PREDICATE
public AsyncInlineCachingRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.util.function.Predicate<java.lang.String> regionBeanName)
AsyncInlineCachingRegionConfigurer
initialized with the given
CrudRepository
and Predicate
identifying the Region
on which
Asynchronous Inline Caching will be configured.repository
- CrudRepository
used to perform data access operations on an external data source
triggered by cache events and operations on the identified Region
; must not be null.regionBeanName
- Predicate
used to identify the Region
by name
on which
Asynchronous Inline Caching will be configured.java.lang.IllegalArgumentException
- if CrudRepository
is null.CrudRepository
,
Predicate
public static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> create(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.util.function.Predicate<java.lang.String> regionBeanName)
AsyncInlineCachingRegionConfigurer
initialized with
the given Spring Data CrudRepository
and Predicate
identifying the target Region
on which to configure Asynchronous Inline Caching.T
- type
of the entity.ID
- type
of the identifier, or Region
key.repository
- CrudRepository
used to perform data access operations on an external data source
triggered by cache events and operations on the identified Region
; must not be null.regionBeanName
- Predicate
used to identify the Region
by name
on which
Asynchronous Inline Caching will be configured.AsyncInlineCachingRegionConfigurer
.java.lang.IllegalArgumentException
- if CrudRepository
is null.AsyncInlineCachingRegionConfigurer(CrudRepository, Predicate)
,
CrudRepository
,
Predicate
public static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> create(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.lang.String regionBeanName)
AsyncInlineCachingRegionConfigurer
initialized with
the given Spring Data CrudRepository
and String
identifying the target Region
on which to configure Asynchronous Inline Caching.T
- type
of the entity.ID
- type
of the identifier, or Region
key.repository
- CrudRepository
used to perform data access operations on an external data source
triggered by cache events and operations on the identified Region
; must not be null.regionBeanName
- String
used to identify the Region
by name
on which
Asynchronous Inline Caching will be configured.AsyncInlineCachingRegionConfigurer
.java.lang.IllegalArgumentException
- if CrudRepository
is null.CrudRepository
,
create(CrudRepository, Predicate)
,
String
@NonNull protected java.util.function.Predicate<java.lang.String> getRegionBeanName()
Predicate
identifying the Region
on which Asynchronous Inline Caching
will be configured.Predicate
used to match the Region
by name
on which
Asynchronous Inline Caching will be configured; never null.Predicate
@NonNull protected org.springframework.data.repository.CrudRepository<T,ID> getRepository()
CrudRepository
used to perform data access operations on an external data source
triggered cache events and operations on the target Region
.CrudRepository
used to perform data access operations on an external data source
triggered cache events and operations on the target Region
; never null.CrudRepository
public void configure(java.lang.String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?,?> bean)
Region
by name
with Asynchronous Inline Caching
functionality.
Effectively, this Configurer creates an AsyncEventQueue
attached to the target Region
with a
registered RepositoryAsyncEventListener
to perform asynchronous data access operations triggered by
cache operations to an external, backend data source using a Spring Data CrudRepository
.configure
in interface org.springframework.data.gemfire.config.annotation.RegionConfigurer
beanName
- String
specifying the name of the target Region
and bean name
in the Spring container.bean
- PeerRegionFactoryBean
containing the configuration of the target Region
in the Spring container.PeerRegionFactoryBean
,
newAsyncEventQueue(Cache, String)
@NonNull protected java.lang.String generateId(@NonNull java.lang.String regionBeanName)
ID
for the AsyncEventQueue
.regionBeanName
- name
of the target Region
.ID
for the AsyncEventQueue
.protected org.apache.geode.cache.asyncqueue.AsyncEventQueue newAsyncEventQueue(@NonNull org.apache.geode.cache.Cache peerCache, @NonNull java.lang.String regionBeanName)
AsyncEventQueue
to attach to the target Region
configured for
Asynchronous Inline Caching.peerCache
- reference to the peer cache
; must not be null.regionBeanName
- name
of the target Region
; must not be null.AsyncEventQueue
.AsyncEventQueue
,
Cache
,
generateId(String)
,
newAsyncEventQueueFactory(Cache)
,
newAsyncEventQueue(AsyncEventQueueFactory, String, AsyncEventListener)
,
newRepositoryAsyncEventListener()
,
postProcess(AsyncEventListener)
,
postProcess(AsyncEventQueue)
,
postProcess(AsyncEventQueueFactory)
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueue newAsyncEventQueue(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory factory, @NonNull java.lang.String asyncEventQueueId, @NonNull org.apache.geode.cache.asyncqueue.AsyncEventListener listener)
AsyncEventQueue
using the given AsyncEventQueueFactory
with the given AEQ ID
and AsyncEventListener
.factory
- AsyncEventQueueFactory
used to create the AsyncEventQueue
;
must not be null.asyncEventQueueId
- String
containing the ID for the AsyncEventQueue
;
must not be null.listener
- AsyncEventListener
registered with the AsyncEventQueue
to process cache events
from the AsyncEventQueue
attached to the Region
.AsyncEventQueue
with the ID
and registered AsyncEventListener
.AsyncEventQueueFactory
,
AsyncEventQueue
,
AsyncEventListener
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory newAsyncEventQueueFactory(@NonNull org.apache.geode.cache.Cache peerCache)
AsyncEventQueueFactory
from the given peer
Cache
.peerCache
- Peer Cache
instance used to create an instance of
the AsyncEventQueueFactory
; must not be null.AsyncEventQueueFactory
to create a AsyncEventQueue
.AsyncEventQueueFactory
,
Cache
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener newRepositoryAsyncEventListener()
AsyncEventListener
to register on an AsyncEventQueue
attached to
the target Region
, which uses the CrudRepository
to perform data access operations on an external
backend data source asynchronously when cache events and operations occur on the target Region
.RepositoryAsyncEventListener
.RepositoryAsyncEventListener
,
AsyncEventListener
,
newRepositoryAsyncEventListener(CrudRepository)
,
getRepository()
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener newRepositoryAsyncEventListener(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository)
AsyncEventListener
to register on an AsyncEventQueue
attached to
the target Region
, which uses the given CrudRepository
to perform data access operations on an
external, backend data source asynchronously when cache events and operations occur on the target Region
.repository
- Spring Data CrudRepository
used to perform data access operations on the external,
backend data source; must not be null.RepositoryAsyncEventListener
.RepositoryAsyncEventListener
,
AsyncEventListener
,
getRepository()
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener)
Function
to the framework constructed/provided AsyncEventListener
for post processing.asyncEventListener
- AsyncEventListener
constructed by the framework and post processed by
end-user code encapsulated in the configured
Function
.AsyncEventListener
.AsyncEventListener
,
applyToListener(Function)
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueue postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue)
Function
to the framework constructed/provided AsyncEventQueue
for post processing.asyncEventQueue
- AsyncEventQueue
constructed by the framework and post processed by
end-user code encapsulated in the configured
Function
.AsyncEventQueue
.AsyncEventQueue
,
applyToQueue(Function)
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory)
Function
to the framework constructed/provided AsyncEventQueueFactory
for post processing.asyncEventQueueFactory
- AsyncEventQueueFactory
constructed by the framework and post processed by
end-user code encapsulated in the configured
Function
.AsyncEventQueueFactory
.AsyncEventQueueFactory
,
applyToQueueFactory(Function)
public AsyncInlineCachingRegionConfigurer<T,ID> applyToListener(@Nullable java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventListener,org.apache.geode.cache.asyncqueue.AsyncEventListener> asyncEventListenerPostProcessor)
Function
applied to the framework constructed
and provided AsyncEventListener
for post processing.asyncEventListenerPostProcessor
- user-defined Function
encapsulating the logic applied to
the framework constructed/provided AsyncEventListener
for post-processing.AsyncInlineCachingRegionConfigurer
.AsyncEventListener
,
Function
public AsyncInlineCachingRegionConfigurer<T,ID> applyToQueue(@Nullable java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventQueue,org.apache.geode.cache.asyncqueue.AsyncEventQueue> asyncEventQueuePostProcessor)
Function
applied to the framework constructed
and provided AsyncEventQueue
for post processing.asyncEventQueuePostProcessor
- user-defined Function
encapsulating the logic applied to
the framework constructed AsyncEventQueue
for post-processing.AsyncInlineCachingRegionConfigurer
.AsyncEventQueue
,
Function
public AsyncInlineCachingRegionConfigurer<T,ID> applyToQueueFactory(@Nullable java.util.function.Function<org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory,org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory> asyncEventQueueFactoryPostProcessor)
Function
applied to the framework constructed
and provided AsyncEventQueueFactory
for post processing.asyncEventQueueFactoryPostProcessor
- user-defined Function
encapsulating the logic applied to
the framework constructed AsyncEventQueueFactory
for post-processing.AsyncInlineCachingRegionConfigurer
.AsyncEventQueueFactory
,
Function
public AsyncInlineCachingRegionConfigurer<T,ID> withAsyncEventErrorHandler(@Nullable RepositoryAsyncEventListener.AsyncEventErrorHandler errorHandler)
RepositoryAsyncEventListener.AsyncEventErrorHandler
to handle errors thrown while processing
AsyncEvents
in the AsyncEventListener
.errorHandler
- RepositoryAsyncEventListener.AsyncEventErrorHandler
used to handle errors thrown while processing
AsyncEvents
in the AsyncEventListener
.AsyncInlineCachingRegionConfigurer
.RepositoryAsyncEventListener.AsyncEventErrorHandler
public AsyncInlineCachingRegionConfigurer<T,ID> withParallelQueue()
AEQs
attached to Regions
hosted
and distributed across the cache cluster to process cache events.
Default is false, or serial.AsyncInlineCachingRegionConfigurer
.withSerialQueue()
public AsyncInlineCachingRegionConfigurer<T,ID> withPersistentQueue()
AsyncEventQueue
to persist cache events to disk in order to
preserve unprocessed cache events while offline.
Keep in mind that the AsyncEventQueue
must be persistent if the data Region
to which the AEQ is attached is persistent.
Default is false.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueBatchConflationEnabled()
AsyncEventQueue
to conflate cache events in the queue.
When conflation is enabled, the AEQ listener will only receive the latest update in the AEQ for cache entry
based on key.
Defaults to false.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueBatchSize(int batchSize)
AsyncEventQueue
batch size
, which determines
the number (i.e. threshold) of cache events that will trigger the AEQ listener, before any set period of time.
The batch size is often used in tandem with the batch time interval, which determines when the AEQ listener
will be invoked after a period of time if the batch size is not reached within the period so that cache events
can also be processed in a timely manner if they are occurring infrequently.
Defaults to 100.batchSize
- the number
of cache events in the queue before the AEQ listener is called.AsyncInlineCachingRegionConfigurer
.withQueueBatchTimeInterval(Duration)
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueBatchTimeInterval(java.time.Duration batchTimeInterval)
AsyncEventQueue
batch time interval
determining
when the AEQ listener will be trigger before the number of cache events reaches any set size.
The Duration
is converted to milliseconds (ms), as expected by the configuration
of the AsyncEventQueue
.
The batch time interval is often used in tandem with batch size, which determines for how many cache events
in the queue will trigger the AEQ listener. If cache events are occurring rather frequently, then the batch size
can help reduce memory consumption by processing the cache events before the batch time interval expires.
Defaults to 5 ms.batchTimeInterval
- Duration
of time to determine when the AEQ listener should be invoked with
any existing cache events in the queue.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueDiskStore(java.lang.String diskStoreName)
name
of the DiskStore
used by
the AsyncEventQueue
to persist or overflow cache events.
By default, the AEQ will write cache events to the DEFAULT DiskStore
.diskStoreName
- name
of the DiskStore
.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueDiskSynchronizationEnabled()
AsyncEventQueue
to perform all disk write operations synchronously.
Default is true.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueDispatcherThreadCount(int dispatcherThreadCount)
Threads
to process the cache events (contents)
in the AsyncEventQueue
when the queue is parallel.
When a queue is parallel, the total number of queues is determined by the number of Geode members
hosting the Region
to which the queue is attached.
When a queue is serial and multiple dispatcher threads are configured, Geode creates an additional copy of
the queue for each thread on each Geode member that hosts the queue. When the queue is serial and multiple
dispatcher threads are configure, then you can use the GatewaySender
GatewaySender.OrderPolicy
to control
the distribution of cache events from the queue by the threads.
Default is 5.dispatcherThreadCount
- number
of dispatcher Threads
processing cache events
in the queue.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventDispatchingPaused()
AsyncEventQueue
is currently processing cache events
or is paused.
When paused, cache events will not be dispatched to the AEQ listener for processing. Call the
AsyncEventQueue.resumeEventDispatching()
to resume cache event processing and AEQ listener callbacks.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventFilters(java.util.List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters)
AsyncEventQueue
with a List
of
GatewayEventFilters
to filter cache events sent to the configured AEQ listener.eventFilters
- List
of GatewayEventFilters
used to control and filter
the cache events sent to the configured AEQ listener.AsyncInlineCachingRegionConfigurer
.GatewayEventFilter
,
List
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventSubstitutionFilter(@Nullable org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID,T> eventSubstitutionFilter)
AsyncEventQueue
with a
cache event substitution filter
used to replace (or "substitute")
the original cache entry event value enqueued in the AEQ.eventSubstitutionFilter
- GatewayEventSubstitutionFilter
used to replace/substitute the value
in the enqueued cache entry event.AsyncInlineCachingRegionConfigurer
.GatewayEventSubstitutionFilter
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueForwardedExpirationDestroyEvents()
Region
entry destroyed events due to expiration
are forwarded to the AsyncEventQueue
.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueMaxMemory(int maximumMemory)
AsyncEventQueue
.
After the maximum memory threshold is reached then the AEQ overflows cache events to disk.
Default to 100 MB.maximumMemory
- Integer
value specifying the maximum amount of memory in megabytes used by the AEQ
to capture cache events.AsyncInlineCachingRegionConfigurer
.public AsyncInlineCachingRegionConfigurer<T,ID> withQueueOrderPolicy(@Nullable org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy)
AsyncEventQueue
order of processing for cache events when the AEQ
is serial and the AEQ is using multiple dispatcher threads.orderPolicy
- GatewaySender
GatewaySender.OrderPolicy
used to determine the order of processing
for cache events when the AEQ is serial and uses multiple dispatcher threads.AsyncInlineCachingRegionConfigurer
.GatewaySender.OrderPolicy
public AsyncInlineCachingRegionConfigurer<T,ID> withSerialQueue()
AEQ
attached to a Region
(possibly) hosted and distributed across the cache cluster to process cache events.
Default is false, or serial.AsyncInlineCachingRegionConfigurer
.withParallelQueue()