Class AsyncEventQueueFactoryBean
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<T>
org.springframework.data.gemfire.wan.AbstractWANComponentFactoryBean<AsyncEventQueue>
org.springframework.data.gemfire.wan.AsyncEventQueueFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,BeanNameAware,DisposableBean,FactoryBean<AsyncEventQueue>,InitializingBean
Spring
FactoryBean for constructing, configuring and initializing AsyncEventQueues.- Author:
- David Turanski, John Blum
- See Also:
-
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(Cache cache) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.AsyncEventQueueFactoryBean(Cache cache, AsyncEventListener asyncEventListener) Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected voiddoInit()Returns theAsyncEventQueuecreated by thisFactoryBean.Class<?>booleanbooleanbooleanfinal voidsetAsyncEventListener(AsyncEventListener listener) Configures theAsyncEventListenercalled whenAsyncEventsare enqueued into theAsyncEventQueuecreated by thisFactoryBean.voidsetAsyncEventQueue(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<GatewayEventFilter> eventFilters) voidsetGatewayEventSubstitutionFilter(GatewayEventSubstitutionFilter eventSubstitutionFilter) voidsetMaximumQueueMemory(Integer maximumQueueMemory) voidsetOrderPolicy(String orderPolicy) Configures theAsyncEventQueue(AEQ) ordering policy (e.g.voidsetOrderPolicy(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, getLog, getOptionalLog, isDebugLoggingEnabled, isErrorLoggingEnabled, isInfoLoggingEnabled, isSingleton, isWarnLoggingEnabled, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarning, logWarning, newLog, setBeanClassLoader, setBeanFactory
-
Constructor Details
-
AsyncEventQueueFactoryBean
Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.- Parameters:
cache- the GemFire Cache reference.- See Also:
-
AsyncEventQueueFactoryBean
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<AsyncEventQueue>
-
destroy
public void destroy()- Specified by:
destroyin interfaceDisposableBean- Overrides:
destroyin classAbstractWANComponentFactoryBean<AsyncEventQueue>
-
setAsyncEventListener
Configures theAsyncEventListenercalled whenAsyncEventsare enqueued into theAsyncEventQueuecreated by thisFactoryBean.- Parameters:
listener- the configuredAsyncEventListener.- Throws:
IllegalStateException- if theAsyncEventQueuehas already bean created.- See Also:
-
getAsyncEventListener
- Returns:
- the configured
AsyncEventListener. - See Also:
-
setAsyncEventQueue
Configures theAsyncEventQueuereturned by thisFactoryBean.- Parameters:
asyncEventQueue- overrides theAsyncEventQueuereturned by thisFactoryBean.- See Also:
-
getAsyncEventQueue
Returns theAsyncEventQueuecreated by thisFactoryBean.- Returns:
- a reference to the
AsyncEventQueuecreated by thisFactoryBean. - See Also:
-
setBatchConflationEnabled
Enable or disableAsyncEventQueue(AEQ) message conflation.- Parameters:
batchConflationEnabled-Booleanindicating whether to conflate queued events.- See Also:
-
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:
-
setDiskStoreRef
-
setDiskSynchronous
Configures theAsyncEventQueue(AEQ) disk write synchronization policy.- Parameters:
diskSynchronous- boolean value indicating whether disk writes are synchronous.- See Also:
-
setDispatcherThreads
Configures the number of dispatcher threads used to process Region Events from the associatedAsyncEventQueue(AEQ). -
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:
-
setGatewayEventFilters
-
setGatewayEventSubstitutionFilter
public void setGatewayEventSubstitutionFilter(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:
-
setOrderPolicy
-
setParallel
-
isParallelEventQueue
public boolean isParallelEventQueue() -
setPauseEventDispatching
-
isPauseEventDispatching
public boolean isPauseEventDispatching() -
setPersistent
-
isSerialEventQueue
public boolean isSerialEventQueue()
-