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:
-
FunctionPredicateCacheRegionAsyncEventListenerAsyncEventQueueAsyncEventQueueFactoryGatewayEventFilterGatewayEventSubstitutionFilterGatewaySender.OrderPolicyPeerRegionFactoryBeanRegionConfigurerCrudRepositoryRepositoryAsyncEventListener.AsyncEventErrorHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionAsyncInlineCachingRegionConfigurer(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofAsyncInlineCachingRegionConfigurerinitialized with the givenCrudRepositoryandPredicateidentifying theRegionon 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-definedFunctionapplied to the framework constructed and providedAsyncEventListenerfor 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-definedFunctionapplied to the framework constructed and providedAsyncEventQueuefor 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-definedFunctionapplied to the framework constructed and providedAsyncEventQueueFactoryfor post processing.voidConfigures the targetRegionbynamewith Asynchronous Inline Caching functionality.static <T,ID> AsyncInlineCachingRegionConfigurer<T, ID> Factory method used to construct a new instance ofAsyncInlineCachingRegionConfigurerinitialized with the given Spring DataCrudRepositoryandStringidentifying the targetRegionon 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 ofAsyncInlineCachingRegionConfigurerinitialized with the given Spring DataCrudRepositoryandPredicateidentifying the targetRegionon which to configure Asynchronous Inline Caching.protected StringgenerateId(String regionBeanName) Generates a newIDfor theAsyncEventQueue.Gets thePredicateidentifying theRegionon which Asynchronous Inline Caching will be configured.Gets the Spring DataCrudRepositoryused to perform data access operations on an external data source triggered cache events and operations on the targetRegion.protected org.apache.geode.cache.asyncqueue.AsyncEventQueuenewAsyncEventQueue(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory factory, String asyncEventQueueId, org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Constructs (creates) a new instance ofAsyncEventQueueusing the givenAsyncEventQueueFactorywith the givenAEQ IDandAsyncEventListener.protected org.apache.geode.cache.asyncqueue.AsyncEventQueuenewAsyncEventQueue(org.apache.geode.cache.Cache peerCache, String regionBeanName) Constructs a new instance of anAsyncEventQueueto attach to the targetRegionconfigured for Asynchronous Inline Caching.protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactorynewAsyncEventQueueFactory(org.apache.geode.cache.Cache peerCache) Constructs (creates) a new instance of theAsyncEventQueueFactoryfrom the given peerCache.protected org.apache.geode.cache.asyncqueue.AsyncEventListenerConstructs a new Apache GeodeAsyncEventListenerto register on anAsyncEventQueueattached to the targetRegion, which uses theCrudRepositoryto 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.AsyncEventListenernewRepositoryAsyncEventListener(org.springframework.data.repository.CrudRepository<T, ID> repository) Constructs a new Apache GeodeAsyncEventListenerto register on anAsyncEventQueueattached to the targetRegion, which uses the givenCrudRepositoryto 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.AsyncEventListenerpostProcess(org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Applies the user-definedFunctionto the framework constructed/providedAsyncEventListenerfor post processing.protected org.apache.geode.cache.asyncqueue.AsyncEventQueuepostProcess(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Applies the user-definedFunctionto the framework constructed/providedAsyncEventQueuefor post processing.protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactorypostProcess(org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory) Applies the user-definedFunctionto the framework constructed/providedAsyncEventQueueFactoryfor post processing.Builder method used to configure aRepositoryAsyncEventListener.AsyncEventErrorHandlerto handle errors thrown while processingAsyncEventsin theAsyncEventListener.Builder method used to enable allAEQsattached toRegionshosted and distributed across the cache cluster to process cache events.Builder method used to enable theAsyncEventQueueto persist cache events to disk in order to preserve unprocessed cache events while offline.Builder method used to configure theAsyncEventQueueto conflate cache events in the queue.withQueueBatchSize(int batchSize) Builder method used to configure theAsyncEventQueuebatch size, which determines the number (i.e.withQueueBatchTimeInterval(Duration batchTimeInterval) Builder method used to configure theAsyncEventQueuebatch time intervaldetermining 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 thenameof theDiskStoreused by theAsyncEventQueueto persist or overflow cache events.Builder method used to configure theAsyncEventQueueto perform all disk write operations synchronously.withQueueDispatcherThreadCount(int dispatcherThreadCount) Builder method to configure the number ofThreadsto process the cache events (contents) in theAsyncEventQueuewhen the queue is parallel.Builder method used to configure whether theAsyncEventQueueis currently processing cache events or is paused.withQueueEventFilters(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) Builder method to configure theAsyncEventQueuewith aListofGatewayEventFiltersto filter cache events sent to the configured AEQ listener.withQueueEventSubstitutionFilter(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID, T> eventSubstitutionFilter) Builder method used to configure theAsyncEventQueuewith acache event substitution filterused to replace (or "substitute") the original cache entry event value enqueued in the AEQ.Builder method used to configure whether cacheRegionentry 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 theAsyncEventQueueorder of processing for cache events when the AEQ is serial and the AEQ is using multiple dispatcher threads.Builder method used to enable a singleAEQattached 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, waitMethods inherited from interface org.springframework.data.gemfire.config.annotation.support.Configurer
getOrderMethods 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 ofAsyncInlineCachingRegionConfigurerinitialized with the givenCrudRepositoryandPredicateidentifying theRegionon which Asynchronous Inline Caching will be configured.- Parameters:
repository-CrudRepositoryused to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion; must not be null.regionBeanName-Predicateused to identify theRegionbynameon which Asynchronous Inline Caching will be configured.- Throws:
IllegalArgumentException- ifCrudRepositoryis null.- See Also:
-
CrudRepositoryPredicate
-
-
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 ofAsyncInlineCachingRegionConfigurerinitialized with the given Spring DataCrudRepositoryandPredicateidentifying the targetRegionon which to configure Asynchronous Inline Caching.- Type Parameters:
T-typeof the entity.ID-typeof the identifier, orRegionkey.- Parameters:
repository-CrudRepositoryused to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion; must not be null.regionBeanName-Predicateused to identify theRegionbynameon which Asynchronous Inline Caching will be configured.- Returns:
- a new
AsyncInlineCachingRegionConfigurer. - Throws:
IllegalArgumentException- ifCrudRepositoryis 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 ofAsyncInlineCachingRegionConfigurerinitialized with the given Spring DataCrudRepositoryandStringidentifying the targetRegionon which to configure Asynchronous Inline Caching.- Type Parameters:
T-typeof the entity.ID-typeof the identifier, orRegionkey.- Parameters:
repository-CrudRepositoryused to perform data access operations on an external data source triggered by cache events and operations on the identifiedRegion; must not be null.regionBeanName-Stringused to identify theRegionbynameon which Asynchronous Inline Caching will be configured.- Returns:
- a new
AsyncInlineCachingRegionConfigurer. - Throws:
IllegalArgumentException- ifCrudRepositoryis null.- See Also:
-
CrudRepositorycreate(CrudRepository, Predicate)String
-
getRegionBeanName
Gets thePredicateidentifying theRegionon which Asynchronous Inline Caching will be configured. -
getRepository
Gets the Spring DataCrudRepositoryused to perform data access operations on an external data source triggered cache events and operations on the targetRegion.- Returns:
- the Spring Data
CrudRepositoryused 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 targetRegionbynamewith Asynchronous Inline Caching functionality. Effectively, this Configurer creates anAsyncEventQueueattached to the targetRegionwith a registeredRepositoryAsyncEventListenerto perform asynchronous data access operations triggered by cache operations to an external, backend data source using a Spring DataCrudRepository.- Specified by:
configurein interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer- Parameters:
beanName-Stringspecifying the name of the targetRegionand bean name in the Spring container.bean-PeerRegionFactoryBeancontaining the configuration of the targetRegionin the Spring container.- See Also:
-
PeerRegionFactoryBeannewAsyncEventQueue(Cache, String)
-
generateId
Generates a newIDfor 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 anAsyncEventQueueto attach to the targetRegionconfigured for Asynchronous Inline Caching.- Parameters:
peerCache- reference to thepeer cache; must not be null.regionBeanName-nameof 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 ofAsyncEventQueueusing the givenAsyncEventQueueFactorywith the givenAEQ IDandAsyncEventListener.- Parameters:
factory-AsyncEventQueueFactoryused to create theAsyncEventQueue; must not be null.asyncEventQueueId-Stringcontaining the ID for theAsyncEventQueue; must not be null.listener-AsyncEventListenerregistered with theAsyncEventQueueto process cache events from theAsyncEventQueueattached to theRegion.- Returns:
- a new
AsyncEventQueuewith theIDand registeredAsyncEventListener. - See Also:
-
AsyncEventQueueFactoryAsyncEventQueueAsyncEventListener
-
newAsyncEventQueueFactory
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory newAsyncEventQueueFactory(@NonNull org.apache.geode.cache.Cache peerCache) Constructs (creates) a new instance of theAsyncEventQueueFactoryfrom the given peerCache.- Parameters:
peerCache- PeerCacheinstance used to create an instance of theAsyncEventQueueFactory; must not be null.- Returns:
- a new instance of
AsyncEventQueueFactoryto create aAsyncEventQueue. - See Also:
-
AsyncEventQueueFactoryCache
-
newRepositoryAsyncEventListener
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener newRepositoryAsyncEventListener()Constructs a new Apache GeodeAsyncEventListenerto register on anAsyncEventQueueattached to the targetRegion, which uses theCrudRepositoryto 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 GeodeAsyncEventListenerto register on anAsyncEventQueueattached to the targetRegion, which uses the givenCrudRepositoryto perform data access operations on an external, backend data source asynchronously when cache events and operations occur on the targetRegion.- Parameters:
repository- Spring DataCrudRepositoryused to perform data access operations on the external, backend data source; must not be null.- Returns:
- a new
RepositoryAsyncEventListener. - See Also:
-
RepositoryAsyncEventListenerAsyncEventListenergetRepository()
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventListener postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Applies the user-definedFunctionto the framework constructed/providedAsyncEventListenerfor post processing.- Parameters:
asyncEventListener-AsyncEventListenerconstructed by the framework and post processed by end-user code encapsulated in theconfiguredFunction.- Returns:
- the post-processed
AsyncEventListener. - See Also:
-
AsyncEventListenerapplyToListener(Function)
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueue postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Applies the user-definedFunctionto the framework constructed/providedAsyncEventQueuefor post processing.- Parameters:
asyncEventQueue-AsyncEventQueueconstructed by the framework and post processed by end-user code encapsulated in theconfiguredFunction.- Returns:
- the post-processed
AsyncEventQueue. - See Also:
-
AsyncEventQueueapplyToQueue(Function)
-
postProcess
@NonNull protected org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory postProcess(@NonNull org.apache.geode.cache.asyncqueue.AsyncEventQueueFactory asyncEventQueueFactory) Applies the user-definedFunctionto the framework constructed/providedAsyncEventQueueFactoryfor post processing.- Parameters:
asyncEventQueueFactory-AsyncEventQueueFactoryconstructed by the framework and post processed by end-user code encapsulated in theconfiguredFunction.- Returns:
- the post-processed
AsyncEventQueueFactory. - See Also:
-
AsyncEventQueueFactoryapplyToQueueFactory(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-definedFunctionapplied to the framework constructed and providedAsyncEventListenerfor post processing.- Parameters:
asyncEventListenerPostProcessor- user-definedFunctionencapsulating the logic applied to the framework constructed/providedAsyncEventListenerfor post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
AsyncEventListenerFunction
-
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-definedFunctionapplied to the framework constructed and providedAsyncEventQueuefor post processing.- Parameters:
asyncEventQueuePostProcessor- user-definedFunctionencapsulating the logic applied to the framework constructedAsyncEventQueuefor post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
AsyncEventQueueFunction
-
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-definedFunctionapplied to the framework constructed and providedAsyncEventQueueFactoryfor post processing.- Parameters:
asyncEventQueueFactoryPostProcessor- user-definedFunctionencapsulating the logic applied to the framework constructedAsyncEventQueueFactoryfor post-processing.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
AsyncEventQueueFactoryFunction
-
withAsyncEventErrorHandler
public AsyncInlineCachingRegionConfigurer<T,ID> withAsyncEventErrorHandler(@Nullable RepositoryAsyncEventListener.AsyncEventErrorHandler errorHandler) Builder method used to configure aRepositoryAsyncEventListener.AsyncEventErrorHandlerto handle errors thrown while processingAsyncEventsin theAsyncEventListener.- Parameters:
errorHandler-RepositoryAsyncEventListener.AsyncEventErrorHandlerused to handle errors thrown while processingAsyncEventsin theAsyncEventListener.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
withParallelQueue
Builder method used to enable allAEQsattached toRegionshosted 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 theAsyncEventQueueto persist cache events to disk in order to preserve unprocessed cache events while offline. Keep in mind that theAsyncEventQueuemust be persistent if the dataRegionto which the AEQ is attached is persistent. Default is false.- Returns:
- this
AsyncInlineCachingRegionConfigurer.
-
withQueueBatchConflationEnabled
Builder method used to configure theAsyncEventQueueto 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 theAsyncEventQueuebatch 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- thenumberof 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 theAsyncEventQueuebatch time intervaldetermining when the AEQ listener will be trigger before the number of cache events reaches any set size. TheDurationis 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-Durationof 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 thenameof theDiskStoreused by theAsyncEventQueueto persist or overflow cache events. By default, the AEQ will write cache events to the DEFAULTDiskStore.- Parameters:
diskStoreName-nameof theDiskStore.- Returns:
- this
AsyncInlineCachingRegionConfigurer.
-
withQueueDiskSynchronizationEnabled
Builder method used to configure theAsyncEventQueueto 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 ofThreadsto process the cache events (contents) in theAsyncEventQueuewhen the queue is parallel. When a queue is parallel, the total number of queues is determined by the number of Geode members hosting theRegionto 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 theGatewaySenderGatewaySender.OrderPolicyto control the distribution of cache events from the queue by the threads. Default is 5.- Parameters:
dispatcherThreadCount-numberof dispatcherThreadsprocessing cache events in the queue.- Returns:
- this
AsyncInlineCachingRegionConfigurer.
-
withQueueEventDispatchingPaused
Builder method used to configure whether theAsyncEventQueueis 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 theAsyncEventQueuewith aListofGatewayEventFiltersto filter cache events sent to the configured AEQ listener.- Parameters:
eventFilters-ListofGatewayEventFiltersused to control and filter the cache events sent to the configured AEQ listener.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
GatewayEventFilterList
-
withQueueEventSubstitutionFilter
public AsyncInlineCachingRegionConfigurer<T,ID> withQueueEventSubstitutionFilter(@Nullable org.apache.geode.cache.wan.GatewayEventSubstitutionFilter<ID, T> eventSubstitutionFilter) Builder method used to configure theAsyncEventQueuewith acache event substitution filterused to replace (or "substitute") the original cache entry event value enqueued in the AEQ.- Parameters:
eventSubstitutionFilter-GatewayEventSubstitutionFilterused to replace/substitute the value in the enqueued cache entry event.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-
GatewayEventSubstitutionFilter
-
withQueueForwardedExpirationDestroyEvents
Builder method used to configure whether cacheRegionentry 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-Integervalue 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 theAsyncEventQueueorder of processing for cache events when the AEQ is serial and the AEQ is using multiple dispatcher threads.- Parameters:
orderPolicy-GatewaySenderGatewaySender.OrderPolicyused 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 singleAEQattached to aRegion(possibly) hosted and distributed across the cache cluster to process cache events. Default is false, or serial.- Returns:
- this
AsyncInlineCachingRegionConfigurer. - See Also:
-