Package org.springframework.geode.cache
Class AsyncInlineCachingRegionConfigurer<T,ID>
java.lang.Object
org.springframework.geode.cache.AsyncInlineCachingRegionConfigurer<T,ID>
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.data.gemfire.config.annotation.RegionConfigurer
,org.springframework.data.gemfire.config.annotation.support.Configurer<org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,
?>>
public class AsyncInlineCachingRegionConfigurer<T,ID>
extends Object
implements org.springframework.data.gemfire.config.annotation.RegionConfigurer
A Spring Data for Apache Geode
RegionConfigurer
implementation used to configure a target Region
to use Asynchronous Inline Caching based on the Spring Data Repositories
abstraction.- Since:
- 1.4.0
- See Also:
-
Function
Predicate
Cache
Region
AsyncEventListener
AsyncEventQueue
AsyncEventQueueFactory
GatewayEventFilter
GatewayEventSubstitutionFilter
GatewaySender.OrderPolicy
PeerRegionFactoryBean
RegionConfigurer
CrudRepository
RepositoryAsyncEventListener.AsyncEventErrorHandler
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionAsyncInlineCachingRegionConfigurer
(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the givenCrudRepository
andPredicate
identifying theRegion
on which Asynchronous Inline Caching will be configured. -
Method Summary
Modifier and TypeMethodDescriptionapplyToListener
(Function<org.apache.geode.cache.asyncqueue.AsyncEventListener, org.apache.geode.cache.asyncqueue.AsyncEventListener> asyncEventListenerPostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventListener
for post processing.applyToQueue
(Function<org.apache.geode.cache.asyncqueue.AsyncEventQueue, org.apache.geode.cache.asyncqueue.AsyncEventQueue> asyncEventQueuePostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventQueue
for post processing.applyToQueueFactory
(Function<org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory, org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory> asyncEventQueueFactoryPostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventQueueFactory
for post processing.void
Configures the targetRegion
byname
with Asynchronous Inline Caching functionality.static <T,
ID> AsyncInlineCachingRegionConfigurer<T, ID> Factory method used to construct a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the given Spring DataCrudRepository
andString
identifying the targetRegion
on which to configure Asynchronous Inline Caching.static <T,
ID> AsyncInlineCachingRegionConfigurer<T, ID> create
(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Factory method used to construct a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the given Spring DataCrudRepository
andPredicate
identifying the targetRegion
on which to configure Asynchronous Inline Caching.protected String
generateId
(String regionBeanName) Generates a newID
for theAsyncEventQueue
.Gets thePredicate
identifying theRegion
on which Asynchronous Inline Caching will be configured.Gets the Spring DataCrudRepository
used to perform data access operations on an external data source triggered cache events and operations on the targetRegion
.protected org.apache.geode.cache.asyncqueue.AsyncEventQueue
newAsyncEventQueue
(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory factory, String asyncEventQueueId, org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Constructs (creates) a new instance ofAsyncEventQueue
using the givenAsyncEventQueueFactory
with the givenAEQ ID
andAsyncEventListener
.protected org.apache.geode.cache.asyncqueue.AsyncEventQueue
newAsyncEventQueue
(org.apache.geode.cache.Cache peerCache, String regionBeanName) Constructs a new instance of anAsyncEventQueue
to attach to the targetRegion
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 theAsyncEventQueueFactory
from the given peerCache
.protected org.apache.geode.cache.asyncqueue.AsyncEventListener
Constructs a new Apache GeodeAsyncEventListener
to register on anAsyncEventQueue
attached to the targetRegion
, which uses theCrudRepository
to perform data access operations on an external backend data source asynchronously when cache events and operations occur on the targetRegion
.protected org.apache.geode.cache.asyncqueue.AsyncEventListener
newRepositoryAsyncEventListener
(org.springframework.data.repository.CrudRepository<T, ID> repository) Constructs a new Apache GeodeAsyncEventListener
to register on anAsyncEventQueue
attached to the targetRegion
, which uses the givenCrudRepository
to perform data access operations on an external, backend data source asynchronously when cache events and operations occur on the targetRegion
.protected org.apache.geode.cache.asyncqueue.AsyncEventListener
postProcess
(org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Applies the user-definedFunction
to the framework constructed/providedAsyncEventListener
for post processing.protected org.apache.geode.cache.asyncqueue.AsyncEventQueue
postProcess
(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Applies the user-definedFunction
to the framework constructed/providedAsyncEventQueue
for post-processing.protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory
postProcess
(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory) Applies the user-definedFunction
to the framework constructed/providedAsyncEventQueueFactory
for post processing.Builder method used to configure aRepositoryAsyncEventListener.AsyncEventErrorHandler
to handle errors thrown while processingAsyncEvents
in theAsyncEventListener
.Builder method used to enable allAEQs
attached toRegions
hosted and distributed across the cache cluster to process cache events.Builder method used to enable theAsyncEventQueue
to persist cache events to disk in order to preserve unprocessed cache events while offline.Builder method used to configure theAsyncEventQueue
to conflate cache events in the queue.withQueueBatchSize
(int batchSize) Builder method used to configure theAsyncEventQueue
batch size
, which determines the number (i.e.withQueueBatchTimeInterval
(Duration batchTimeInterval) Builder method used to configure theAsyncEventQueue
batch time interval
determining when the AEQ listener will be trigger before the number of cache events reaches any set size.withQueueDiskStore
(String diskStoreName) Builder method used to configure thename
of theDiskStore
used by theAsyncEventQueue
to persist or overflow cache events.Builder method used to configure theAsyncEventQueue
to perform all disk write operations synchronously.withQueueDispatcherThreadCount
(int dispatcherThreadCount) Builder method to configure the number ofThreads
to process the cache events (contents) in theAsyncEventQueue
when the queue is parallel.Builder method used to configure whether theAsyncEventQueue
is currently processing cache events or is paused.withQueueEventFilters
(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) Builder method to configure theAsyncEventQueue
with aList
ofGatewayEventFilters
to filter cache events sent to the configured AEQ listener.withQueueEventSubstitutionFilter
(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID, T> eventSubstitutionFilter) Builder method used to configure theAsyncEventQueue
with acache event substitution filter
used to replace (or "substitute") the original cache entry event value enqueued in the AEQ.Builder method used to configure whether cacheRegion
entry destroyed events due to expiration are forwarded to theAsyncEventQueue
.withQueueMaxMemory
(int maximumMemory) Builder method used to configure the maximum JVM Heap memory in megabytes used by theAsyncEventQueue
.withQueueOrderPolicy
(org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy) Builder method used to configure theAsyncEventQueue
order of processing for cache events when the AEQ is serial and the AEQ is using multiple dispatcher threads.Builder method used to enable a singleAEQ
attached to aRegion
(possibly) hosted and distributed across the cache cluster to process cache events.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.gemfire.config.annotation.support.Configurer
getOrder
Methods inherited from interface org.springframework.data.gemfire.config.annotation.RegionConfigurer
configure
-
Field Details
-
DEFAULT_REGION_BEAN_NAME_PREDICATE
-
-
Constructor Details
-
AsyncInlineCachingRegionConfigurer
public AsyncInlineCachingRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) Constructs a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the givenCrudRepository
andPredicate
identifying theRegion
on which Asynchronous Inline Caching will be configured.- Parameters:
repository
-CrudRepository
used to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion
; must not be null.regionBeanName
-Predicate
used to identify theRegion
byname
on which Asynchronous Inline Caching will be configured.- Throws:
IllegalArgumentException
- ifCrudRepository
is null.- See Also:
-
CrudRepository
Predicate
-
-
Method Details
-
create
public static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> create(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) Factory method used to construct a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the given Spring DataCrudRepository
andPredicate
identifying the targetRegion
on which to configure Asynchronous Inline Caching.- Type Parameters:
T
-type
of the entity.ID
-type
of the identifier, orRegion
key.- Parameters:
repository
-CrudRepository
used to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion
; must not be null.regionBeanName
-Predicate
used to identify theRegion
byname
on which Asynchronous Inline Caching will be configured.- Returns:
- a new
AsyncInlineCachingRegionConfigurer
. - Throws:
IllegalArgumentException
- ifCrudRepository
is null.- See Also:
-
create
public static <T,ID> AsyncInlineCachingRegionConfigurer<T,ID> create(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable String regionBeanName) Factory method used to construct a new instance ofAsyncInlineCachingRegionConfigurer
initialized with the given Spring DataCrudRepository
andString
identifying the targetRegion
on which to configure Asynchronous Inline Caching.- Type Parameters:
T
-type
of the entity.ID
-type
of the identifier, orRegion
key.- Parameters:
repository
-CrudRepository
used to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion
; must not be null.regionBeanName
-String
used to identify theRegion
byname
on which Asynchronous Inline Caching will be configured.- Returns:
- a new
AsyncInlineCachingRegionConfigurer
. - Throws:
IllegalArgumentException
- ifCrudRepository
is null.- See Also:
-
CrudRepository
create(CrudRepository, Predicate)
String
-
getRegionBeanName
Gets thePredicate
identifying theRegion
on which Asynchronous Inline Caching will be configured. -
getRepository
Gets the Spring DataCrudRepository
used to perform data access operations on an external data source triggered cache events and operations on the targetRegion
.- Returns:
- the Spring Data
CrudRepository
used to perform data access operations on an external data source triggered cache events and operations on the targetRegion
; never null. - See Also:
-
CrudRepository
-
configure
public void configure(String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?, ?> bean) Configures the targetRegion
byname
with Asynchronous Inline Caching functionality. Effectively, this Configurer creates anAsyncEventQueue
attached to the targetRegion
with a registeredRepositoryAsyncEventListener
to perform asynchronous data access operations triggered by cache operations to an external, backend data source using a Spring DataCrudRepository
.- Specified by:
configure
in interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer
- Parameters:
beanName
-String
specifying the name of the targetRegion
and bean name in the Spring container.bean
-PeerRegionFactoryBean
containing the configuration of the targetRegion
in the Spring container.- See Also:
-
PeerRegionFactoryBean
newAsyncEventQueue(Cache, String)
-
generateId
Generates a newID
for theAsyncEventQueue
. -
newAsyncEventQueue
protected org.apache.geode.cache.asyncqueue.AsyncEventQueue newAsyncEventQueue(@NonNull org.apache.geode.cache.Cache peerCache, @NonNull String regionBeanName) Constructs a new instance of anAsyncEventQueue
to attach to the targetRegion
configured for Asynchronous Inline Caching.- Parameters:
peerCache
- reference to thepeer cache
; must not be null.regionBeanName
-name
of the targetRegion
; must not be null.- Returns:
- a new
AsyncEventQueue
. - See Also:
-
newAsyncEventQueue
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueue newAsyncEventQueue(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory factory, @NonNull String asyncEventQueueId, @NonNull org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Constructs (creates) a new instance ofAsyncEventQueue
using the givenAsyncEventQueueFactory
with the givenAEQ ID
andAsyncEventListener
.- Parameters:
factory
-AsyncEventQueueFactory
used to create theAsyncEventQueue
; must not be null.asyncEventQueueId
-String
containing the ID for theAsyncEventQueue
; must not be null.listener
-AsyncEventListener
registered with theAsyncEventQueue
to process cache events from theAsyncEventQueue
attached to theRegion
.- Returns:
- a new
AsyncEventQueue
with theID
and registeredAsyncEventListener
. - See Also:
-
AsyncEventQueueFactory
AsyncEventQueue
AsyncEventListener
-
newAsyncEventQueueFactory
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory newAsyncEventQueueFactory(@NonNull org.apache.geode.cache.Cache peerCache) Constructs (creates) a new instance of theAsyncEventQueueFactory
from the given peerCache
.- Parameters:
peerCache
- PeerCache
instance used to create an instance of theAsyncEventQueueFactory
; must not be null.- Returns:
- a new instance of
AsyncEventQueueFactory
to create aAsyncEventQueue
. - See Also:
-
AsyncEventQueueFactory
Cache
-
newRepositoryAsyncEventListener
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener newRepositoryAsyncEventListener()Constructs a new Apache GeodeAsyncEventListener
to register on anAsyncEventQueue
attached to the targetRegion
, which uses theCrudRepository
to perform data access operations on an external backend data source asynchronously when cache events and operations occur on the targetRegion
.- Returns:
- a new
RepositoryAsyncEventListener
. - See Also:
-
newRepositoryAsyncEventListener
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener newRepositoryAsyncEventListener(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository) Constructs a new Apache GeodeAsyncEventListener
to register on anAsyncEventQueue
attached to the targetRegion
, which uses the givenCrudRepository
to perform data access operations on an external, backend data source asynchronously when cache events and operations occur on the targetRegion
.- Parameters:
repository
- Spring DataCrudRepository
used to perform data access operations on the external, backend data source; must not be null.- Returns:
- a new
RepositoryAsyncEventListener
. - See Also:
-
RepositoryAsyncEventListener
AsyncEventListener
getRepository()
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Applies the user-definedFunction
to the framework constructed/providedAsyncEventListener
for post processing.- Parameters:
asyncEventListener
-AsyncEventListener
constructed by the framework and post processed by end-user code encapsulated in theconfigured
Function
.- Returns:
- the post-processed
AsyncEventListener
. - See Also:
-
AsyncEventListener
applyToListener(Function)
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueue postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Applies the user-definedFunction
to the framework constructed/providedAsyncEventQueue
for post-processing.- Parameters:
asyncEventQueue
-AsyncEventQueue
constructed by the framework and post processed by end-user code encapsulated in theconfigured
Function
.- Returns:
- the post-processed
AsyncEventQueue
. - See Also:
-
AsyncEventQueue
applyToQueue(Function)
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory) Applies the user-definedFunction
to the framework constructed/providedAsyncEventQueueFactory
for post processing.- Parameters:
asyncEventQueueFactory
-AsyncEventQueueFactory
constructed by the framework and post processed by end-user code encapsulated in theconfigured
Function
.- Returns:
- the post-processed
AsyncEventQueueFactory
. - See Also:
-
AsyncEventQueueFactory
applyToQueueFactory(Function)
-
applyToListener
public AsyncInlineCachingRegionConfigurer<T,ID> applyToListener(@Nullable Function<org.apache.geode.cache.asyncqueue.AsyncEventListener, org.apache.geode.cache.asyncqueue.AsyncEventListener> asyncEventListenerPostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventListener
for post processing.- Parameters:
asyncEventListenerPostProcessor
- user-definedFunction
encapsulating the logic applied to the framework constructed/providedAsyncEventListener
for post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
AsyncEventListener
Function
-
applyToQueue
public AsyncInlineCachingRegionConfigurer<T,ID> applyToQueue(@Nullable Function<org.apache.geode.cache.asyncqueue.AsyncEventQueue, org.apache.geode.cache.asyncqueue.AsyncEventQueue> asyncEventQueuePostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventQueue
for post processing.- Parameters:
asyncEventQueuePostProcessor
- user-definedFunction
encapsulating the logic applied to the framework constructedAsyncEventQueue
for post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
AsyncEventQueue
Function
-
applyToQueueFactory
public AsyncInlineCachingRegionConfigurer<T,ID> applyToQueueFactory(@Nullable Function<org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory, org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory> asyncEventQueueFactoryPostProcessor) Builder method used to configure the given user-definedFunction
applied to the framework constructed and providedAsyncEventQueueFactory
for post processing.- Parameters:
asyncEventQueueFactoryPostProcessor
- user-definedFunction
encapsulating the logic applied to the framework constructedAsyncEventQueueFactory
for post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
AsyncEventQueueFactory
Function
-
withAsyncEventErrorHandler
public AsyncInlineCachingRegionConfigurer<T,ID> withAsyncEventErrorHandler(@Nullable RepositoryAsyncEventListener.AsyncEventErrorHandler errorHandler) Builder method used to configure aRepositoryAsyncEventListener.AsyncEventErrorHandler
to handle errors thrown while processingAsyncEvents
in theAsyncEventListener
.- Parameters:
errorHandler
-RepositoryAsyncEventListener.AsyncEventErrorHandler
used to handle errors thrown while processingAsyncEvents
in theAsyncEventListener
.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
withParallelQueue
Builder method used to enable allAEQs
attached toRegions
hosted and distributed across the cache cluster to process cache events. Default is false, or serial.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
withPersistentQueue
Builder method used to enable theAsyncEventQueue
to persist cache events to disk in order to preserve unprocessed cache events while offline. Keep in mind that theAsyncEventQueue
must be persistent if the dataRegion
to which the AEQ is attached is persistent. Default is false.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueBatchConflationEnabled
Builder method used to configure theAsyncEventQueue
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.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueBatchSize
Builder method used to configure theAsyncEventQueue
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.- Parameters:
batchSize
- thenumber
of cache events in the queue before the AEQ listener is called.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
withQueueBatchTimeInterval
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueBatchTimeInterval(Duration batchTimeInterval) Builder method used to configure theAsyncEventQueue
batch time interval
determining when the AEQ listener will be trigger before the number of cache events reaches any set size. TheDuration
is converted to milliseconds (ms), as expected by the configuration of theAsyncEventQueue
. 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.- Parameters:
batchTimeInterval
-Duration
of time to determine when the AEQ listener should be invoked with any existing cache events in the queue.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueDiskStore
Builder method used to configure thename
of theDiskStore
used by theAsyncEventQueue
to persist or overflow cache events. By default, the AEQ will write cache events to the DEFAULTDiskStore
.- Parameters:
diskStoreName
-name
of theDiskStore
.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueDiskSynchronizationEnabled
Builder method used to configure theAsyncEventQueue
to perform all disk write operations synchronously. Default is true.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueDispatcherThreadCount
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueDispatcherThreadCount(int dispatcherThreadCount) Builder method to configure the number ofThreads
to process the cache events (contents) in theAsyncEventQueue
when the queue is parallel. When a queue is parallel, the total number of queues is determined by the number of Geode members hosting theRegion
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 theGatewaySender
GatewaySender.OrderPolicy
to control the distribution of cache events from the queue by the threads. Default is 5.- Parameters:
dispatcherThreadCount
-number
of dispatcherThreads
processing cache events in the queue.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueEventDispatchingPaused
Builder method used to configure whether theAsyncEventQueue
is currently processing cache events or is paused. When paused, cache events will not be dispatched to the AEQ listener for processing. Call theAsyncEventQueue.resumeEventDispatching()
to resume cache event processing and AEQ listener callbacks.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueEventFilters
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventFilters(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) Builder method to configure theAsyncEventQueue
with aList
ofGatewayEventFilters
to filter cache events sent to the configured AEQ listener.- Parameters:
eventFilters
-List
ofGatewayEventFilters
used to control and filter the cache events sent to the configured AEQ listener.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
GatewayEventFilter
List
-
withQueueEventSubstitutionFilter
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventSubstitutionFilter(@Nullable org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID, T> eventSubstitutionFilter) Builder method used to configure theAsyncEventQueue
with acache event substitution filter
used to replace (or "substitute") the original cache entry event value enqueued in the AEQ.- Parameters:
eventSubstitutionFilter
-GatewayEventSubstitutionFilter
used to replace/substitute the value in the enqueued cache entry event.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
GatewayEventSubstitutionFilter
-
withQueueForwardedExpirationDestroyEvents
Builder method used to configure whether cacheRegion
entry destroyed events due to expiration are forwarded to theAsyncEventQueue
.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueMaxMemory
Builder method used to configure the maximum JVM Heap memory in megabytes used by theAsyncEventQueue
. After the maximum memory threshold is reached then the AEQ overflows cache events to disk. Default to 100 MB.- Parameters:
maximumMemory
-Integer
value specifying the maximum amount of memory in megabytes used by the AEQ to capture cache events.- Returns:
- this
AsyncInlineCachingRegionConfigurer
.
-
withQueueOrderPolicy
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueOrderPolicy(@Nullable org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy) Builder method used to configure theAsyncEventQueue
order of processing for cache events when the AEQ is serial and the AEQ is using multiple dispatcher threads.- Parameters:
orderPolicy
-GatewaySender
GatewaySender.OrderPolicy
used to determine the order of processing for cache events when the AEQ is serial and uses multiple dispatcher threads.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-
GatewaySender.OrderPolicy
-
withSerialQueue
Builder method used to enable a singleAEQ
attached to aRegion
(possibly) hosted and distributed across the cache cluster to process cache events. Default is false, or serial.- Returns:
- this
AsyncInlineCachingRegionConfigurer
. - See Also:
-