Class AsyncEventQueueFactoryBean
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<T>
org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
org.springframework.data.gemfire.wan.AsyncEventQueueFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
,org.springframework.beans.factory.InitializingBean
public class AsyncEventQueueFactoryBean
extends AbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
Spring
FactoryBean
for constructing, configuring and initializing AsyncEventQueues
.- See Also:
-
Cache
Region
AsyncEvent
AsyncEventListener
AsyncEventQueue
AsyncEventQueueFactory
FactoryBean
AbstractWANComponentFactoryBean
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean
cache, factory, logger
Fields inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
DEFAULT_SINGLETON
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionAsyncEventQueueFactoryBean
(org.apache.geode.cache.Cache cache) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.AsyncEventQueueFactoryBean
(org.apache.geode.cache.Cache cache, org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
protected void
doInit()
org.apache.geode.cache.asyncqueue.AsyncEventListener
Returns the configuredAsyncEventListener
for theAsyncEventQueue
returned by thisFactoryBean
.org.apache.geode.cache.asyncqueue.AsyncEventQueue
Returns theAsyncEventQueue
created by thisFactoryBean
.org.apache.geode.cache.asyncqueue.AsyncEventQueue
Class<?>
boolean
boolean
boolean
final void
setAsyncEventListener
(org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Configures theAsyncEventListener
called whenAsyncEvents
are enqueued into theAsyncEventQueue
created by thisFactoryBean
.void
setAsyncEventQueue
(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Configures theAsyncEventQueue
returned by thisFactoryBean
.void
setBatchConflationEnabled
(Boolean batchConflationEnabled) Enable or disableAsyncEventQueue
(AEQ) message conflation.void
setBatchSize
(Integer batchSize) void
setBatchTimeInterval
(Integer batchTimeInterval) Configures theAsyncEventQueue
(AEQ) interval between sending batches.void
setDiskStoreRef
(String diskStoreRef) void
setDiskSynchronous
(Boolean diskSynchronous) Configures theAsyncEventQueue
(AEQ) disk write synchronization policy.void
setDispatcherThreads
(Integer dispatcherThreads) Configures the number of dispatcher threads used to process Region Events from the associatedAsyncEventQueue
(AEQ).void
setForwardExpirationDestroy
(Boolean forwardExpirationDestroy) Forwards expiration (action-based) destroy events to theAsyncEventQueue
(AEQ).void
setGatewayEventFilters
(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) void
setGatewayEventSubstitutionFilter
(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter eventSubstitutionFilter) void
setMaximumQueueMemory
(Integer maximumQueueMemory) void
setOrderPolicy
(String orderPolicy) Configures theAsyncEventQueue
(AEQ) ordering policy (e.g.void
setOrderPolicy
(org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy) void
setParallel
(Boolean parallel) void
setPauseEventDispatching
(Boolean pauseEventDispatching) void
setPersistent
(Boolean persistent) Methods inherited from class org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean
afterPropertiesSet, getCache, getName, setBeanName, setCache, setFactory, setName
Methods inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
getBeanClassLoader, getBeanFactory, getBeanName, getLogger, getOptionalLogger, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLogger, setBeanClassLoader, setBeanFactory
-
Constructor Details
-
AsyncEventQueueFactoryBean
public AsyncEventQueueFactoryBean(org.apache.geode.cache.Cache cache) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.- Parameters:
cache
- the GemFire Cache reference.- See Also:
-
AsyncEventQueueFactoryBean
public AsyncEventQueueFactoryBean(org.apache.geode.cache.Cache cache, org.apache.geode.cache.asyncqueue.AsyncEventListener asyncEventListener) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.- Parameters:
cache
- the GemFire Cache reference.asyncEventListener
- requiredAsyncEventListener
-
-
Method Details
-
getObject
- Throws:
Exception
-
getObjectType
-
doInit
protected void doInit()- Specified by:
doInit
in classAbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Overrides:
destroy
in classAbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
-
setAsyncEventListener
public final void setAsyncEventListener(org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Configures theAsyncEventListener
called whenAsyncEvents
are enqueued into theAsyncEventQueue
created by thisFactoryBean
.- Parameters:
listener
- the configuredAsyncEventListener
.- Throws:
IllegalStateException
- if theAsyncEventQueue
has already bean created.- See Also:
-
AsyncEventListener
-
getAsyncEventListener
public org.apache.geode.cache.asyncqueue.AsyncEventListener getAsyncEventListener()Returns the configuredAsyncEventListener
for theAsyncEventQueue
returned by thisFactoryBean
.- Returns:
- the configured
AsyncEventListener
. - See Also:
-
AsyncEventListener
setAsyncEventListener(AsyncEventListener)
-
setAsyncEventQueue
public void setAsyncEventQueue(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Configures theAsyncEventQueue
returned by thisFactoryBean
.- Parameters:
asyncEventQueue
- overrides theAsyncEventQueue
returned by thisFactoryBean
.- See Also:
-
AsyncEventQueue
-
getAsyncEventQueue
public org.apache.geode.cache.asyncqueue.AsyncEventQueue getAsyncEventQueue()Returns theAsyncEventQueue
created by thisFactoryBean
.- Returns:
- a reference to the
AsyncEventQueue
created by thisFactoryBean
. - See Also:
-
AsyncEventQueue
-
setBatchConflationEnabled
Enable or disableAsyncEventQueue
(AEQ) message conflation.- Parameters:
batchConflationEnabled
-Boolean
indicating whether to conflate queued events.- See Also:
-
AsyncEventQueueFactory.setBatchConflationEnabled(boolean)
-
setBatchSize
-
setBatchTimeInterval
Configures theAsyncEventQueue
(AEQ) interval between sending batches.- Parameters:
batchTimeInterval
-Integer
specifying the maximum number of milliseconds that can elapse between sending batches.- See Also:
-
AsyncEventQueueFactory.setBatchTimeInterval(int)
-
setDiskStoreRef
-
setDiskSynchronous
Configures theAsyncEventQueue
(AEQ) disk write synchronization policy.- Parameters:
diskSynchronous
- boolean value indicating whether disk writes are synchronous.- See Also:
-
AsyncEventQueueFactory.setDiskSynchronous(boolean)
-
setDispatcherThreads
Configures the number of dispatcher threads used to process Region Events from the associatedAsyncEventQueue
(AEQ).- Parameters:
dispatcherThreads
-Integer
specifying the number of dispatcher threads used to processRegion
events from the associated queue.- See Also:
-
AsyncEventQueueFactory.setDispatcherThreads(int)
-
setForwardExpirationDestroy
Forwards expiration (action-based) destroy events to theAsyncEventQueue
(AEQ). By default, destroy events are not added to the AEQ. Setting this attribute to true will add all expiration destroy events to the AEQ.- Parameters:
forwardExpirationDestroy
- boolean value indicating whether to forward expiration destroy events.- See Also:
-
AsyncEventQueueFactory.setForwardExpirationDestroy(boolean)
ExpirationAttributes.getAction()
ExpirationAction.DESTROY
-
setGatewayEventFilters
public void setGatewayEventFilters(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) -
setGatewayEventSubstitutionFilter
public void setGatewayEventSubstitutionFilter(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter eventSubstitutionFilter) -
setMaximumQueueMemory
-
setOrderPolicy
Configures theAsyncEventQueue
(AEQ) ordering policy (e.g. KEY, PARTITION, THREAD). When dispatcher threads are greater than one, the ordering policy configures the way in which multiple dispatcher threads process Region events from the queue.- Parameters:
orderPolicy
-String
specifying the name of the AEQ order policy.- See Also:
-
AsyncEventQueueFactory.setOrderPolicy(GatewaySender.OrderPolicy)
-
setOrderPolicy
public void setOrderPolicy(org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy) -
setParallel
-
isParallelEventQueue
public boolean isParallelEventQueue() -
setPauseEventDispatching
-
isPauseEventDispatching
public boolean isPauseEventDispatching() -
setPersistent
-
isSerialEventQueue
public boolean isSerialEventQueue()
-