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, 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
(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 TypeMethodDescriptionvoid
destroy()
protected void
doInit()
Returns theAsyncEventQueue
created by thisFactoryBean
.Class<?>
boolean
boolean
boolean
final void
setAsyncEventListener
(AsyncEventListener listener) Configures theAsyncEventListener
called whenAsyncEvents
are enqueued into theAsyncEventQueue
created by thisFactoryBean
.void
setAsyncEventQueue
(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<GatewayEventFilter> eventFilters) void
setGatewayEventSubstitutionFilter
(GatewayEventSubstitutionFilter eventSubstitutionFilter) void
setMaximumQueueMemory
(Integer maximumQueueMemory) void
setOrderPolicy
(String orderPolicy) Configures theAsyncEventQueue
(AEQ) ordering policy (e.g.void
setOrderPolicy
(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
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:
doInit
in classAbstractWANComponentFactoryBean<AsyncEventQueue>
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
- Overrides:
destroy
in classAbstractWANComponentFactoryBean<AsyncEventQueue>
-
setAsyncEventListener
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:
-
getAsyncEventListener
- Returns:
- the configured
AsyncEventListener
. - See Also:
-
setAsyncEventQueue
Configures theAsyncEventQueue
returned by thisFactoryBean
.- Parameters:
asyncEventQueue
- overrides theAsyncEventQueue
returned by thisFactoryBean
.- See Also:
-
getAsyncEventQueue
Returns theAsyncEventQueue
created by thisFactoryBean
.- Returns:
- a reference to the
AsyncEventQueue
created by thisFactoryBean
. - See Also:
-
setBatchConflationEnabled
Enable or disableAsyncEventQueue
(AEQ) message conflation.- Parameters:
batchConflationEnabled
-Boolean
indicating whether to conflate queued events.- See Also:
-
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:
-
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
-String
specifying 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()
-