Spring Data for VMware GemFire
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:
-
CacheRegionAsyncEventAsyncEventListenerAsyncEventQueueAsyncEventQueueFactoryFactoryBeanAbstractWANComponentFactoryBean
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean
cache, factory, loggerFields inherited from class org.springframework.data.gemfire.support.AbstractFactoryBeanSupport
DEFAULT_SINGLETONFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionAsyncEventQueueFactoryBean(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 TypeMethodDescriptionvoiddestroy()protected voiddoInit()org.apache.geode.cache.asyncqueue.AsyncEventListenerReturns the configuredAsyncEventListenerfor theAsyncEventQueuereturned by thisFactoryBean.org.apache.geode.cache.asyncqueue.AsyncEventQueueReturns theAsyncEventQueuecreated by thisFactoryBean.org.apache.geode.cache.asyncqueue.AsyncEventQueueClass<?>booleanbooleanbooleanfinal voidsetAsyncEventListener(org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Configures theAsyncEventListenercalled whenAsyncEventsare enqueued into theAsyncEventQueuecreated by thisFactoryBean.voidsetAsyncEventQueue(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Configures theAsyncEventQueuereturned by thisFactoryBean.voidsetBatchConflationEnabled(Boolean batchConflationEnabled) Enable or disableAsyncEventQueue(AEQ) message conflation.voidsetBatchSize(Integer batchSize) voidsetBatchTimeInterval(Integer batchTimeInterval) Configures theAsyncEventQueue(AEQ) interval between sending batches.voidsetDiskStoreRef(String diskStoreRef) voidsetDiskSynchronous(Boolean diskSynchronous) Configures theAsyncEventQueue(AEQ) disk write synchronization policy.voidsetDispatcherThreads(Integer dispatcherThreads) Configures the number of dispatcher threads used to process Region Events from the associatedAsyncEventQueue(AEQ).voidsetForwardExpirationDestroy(Boolean forwardExpirationDestroy) Forwards expiration (action-based) destroy events to theAsyncEventQueue(AEQ).voidsetGatewayEventFilters(List<org.apache.geode.cache.wan.GatewayEventFilter> eventFilters) voidsetGatewayEventSubstitutionFilter(org.apache.geode.cache.wan.GatewayEventSubstitutionFilter eventSubstitutionFilter) voidsetMaximumQueueMemory(Integer maximumQueueMemory) voidsetOrderPolicy(String orderPolicy) Configures theAsyncEventQueue(AEQ) ordering policy (e.g.voidsetOrderPolicy(org.apache.geode.cache.wan.GatewaySender.OrderPolicy orderPolicy) voidsetParallel(Boolean parallel) voidsetPauseEventDispatching(Boolean pauseEventDispatching) voidsetPersistent(Boolean persistent) Methods inherited from class org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean
afterPropertiesSet, getCache, getName, setBeanName, setCache, setFactory, setNameMethods 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:
doInitin classAbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Overrides:
destroyin classAbstractWANComponentFactoryBean<org.apache.geode.cache.asyncqueue.AsyncEventQueue>
-
setAsyncEventListener
public final void setAsyncEventListener(org.apache.geode.cache.asyncqueue.AsyncEventListener listener) Configures theAsyncEventListenercalled whenAsyncEventsare enqueued into theAsyncEventQueuecreated by thisFactoryBean.- Parameters:
listener- the configuredAsyncEventListener.- Throws:
IllegalStateException- if theAsyncEventQueuehas already bean created.- See Also:
-
AsyncEventListener
-
getAsyncEventListener
public org.apache.geode.cache.asyncqueue.AsyncEventListener getAsyncEventListener()Returns the configuredAsyncEventListenerfor theAsyncEventQueuereturned by thisFactoryBean.- Returns:
- the configured
AsyncEventListener. - See Also:
-
AsyncEventListenersetAsyncEventListener(AsyncEventListener)
-
setAsyncEventQueue
public void setAsyncEventQueue(org.apache.geode.cache.asyncqueue.AsyncEventQueue asyncEventQueue) Configures theAsyncEventQueuereturned by thisFactoryBean.- Parameters:
asyncEventQueue- overrides theAsyncEventQueuereturned by thisFactoryBean.- See Also:
-
AsyncEventQueue
-
getAsyncEventQueue
public org.apache.geode.cache.asyncqueue.AsyncEventQueue getAsyncEventQueue()Returns theAsyncEventQueuecreated by thisFactoryBean.- Returns:
- a reference to the
AsyncEventQueuecreated by thisFactoryBean. - See Also:
-
AsyncEventQueue
-
setBatchConflationEnabled
Enable or disableAsyncEventQueue(AEQ) message conflation.- Parameters:
batchConflationEnabled-Booleanindicating whether to conflate queued events.- See Also:
-
AsyncEventQueueFactory.setBatchConflationEnabled(boolean)
-
setBatchSize
-
setBatchTimeInterval
Configures theAsyncEventQueue(AEQ) interval between sending batches.- Parameters:
batchTimeInterval-Integerspecifying 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-Integerspecifying the number of dispatcher threads used to processRegionevents 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-Stringspecifying 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()
-