public class ArchivePollingContainer extends SimplePollingEventListenerContainer implements SpaceDataEventListener<Object>
setArchiveHandler(ArchiveOperationHandler)
This container can be used to take (remove) objects
from the Space and persist them into an external service.DEFAULT_KEEP_ALIVE_RETRIES, DEFAULT_RECEIVE_TIMEOUT, DEFAULT_RECOVERY_INTERVAL, DEFAULT_THREAD_NAME_PREFIX
beanName, disableTransactionValidation, exceptionHandler, logger, snapshotTemplateThreadLocal
Constructor and Description |
---|
ArchivePollingContainer() |
Modifier and Type | Method and Description |
---|---|
int |
getBatchSize() |
long |
getNonBlockingSleep() |
void |
initialize()
Initialize this container.
|
boolean |
isUseFifoGrouping() |
void |
onEvent(Object data,
GigaSpace gigaSpace,
org.springframework.transaction.TransactionStatus txStatus,
Object source)
An event callback with the actual data object of the event.
|
void |
setArchiveHandler(ArchiveOperationHandler archiveHandler) |
void |
setBatchSize(int batchSize) |
void |
setNonBlockingSleep(long nonBlockingSleepMilliseconds)
In case the space is a proxy to a remote clustered space we use non-blocking take operation
for polling.
|
void |
setUseFifoGrouping(boolean useFifoGrouping)
Enables take operations that are performed with FIFO Grouping enabled
|
protected void |
validateConfiguration()
Validate the configuration of this container.
|
createDefaultTaskExecutor, doAfterStart, doBeforeStop, doInitialize, doReceiveAndExecute, doRescheduleTask, doShutdown, dump, eventReceived, getActiveConsumerCount, getConcurrentConsumers, getEventListenerContainerType, getIdleTaskExecutionLimit, getKeepAliveRetries, getMaxConcurrentConsumers, getMaxEventsPerTask, getName, getReceiveOperationHandler, getReceiveTimeout, getScheduledConsumerCount, getServicesDetails, getServicesMonitors, getTriggerOperationHandler, handleListenerSetupFailure, isPassArrayAsIs, receiveAndExecute, receiveEvent, recoverAfterListenerSetupFailure, refreshConnectionUntilSuccessful, scheduleNewInvokerIfAppropriate, setConcurrentConsumers, setIdleTaskExecutionLimit, setKeepAliveRetries, setMaxConcurrentConsumers, setMaxEventsPerTask, setPassArrayAsIs, setReceiveOperationHandler, setReceiveTimeout, setRecoveryInterval, setTaskExecutor, setTriggerOperationHandler, sleepInbetweenRecoveryAttempts
afterPropertiesSet, destroy, doStart, doStop, executeListener, getActualEventListener, getApplicationContext, getBeanName, getEventListener, getEventListenerClass, getExceptionHandler, getFailedEvents, getGigaSpace, getProcessedEvents, getReceiveTemplate, getStatus, getTemplate, getTransactionDefinition, getTransactionManager, getTransactionManagerName, handleListenerException, incrementFailedEvents, invokeExceptionListener, invokeListener, isActive, isDynamicTemplate, isPerformSnapshot, isRunning, isTransactional, message, onApplicationEvent, process, quiesceStateChanged, registerMetrics, rescheduleTaskIfNecessary, setActiveWhenPrimary, setApplicationContext, setAutoStart, setBeanName, setDisableTransactionValidation, setDynamicTemplate, setEventListener, setEventListenerRef, setExceptionHandler, setGigaSpace, setPerformSnapshot, setProcessingUnitContainerContext, setRegisterSpaceModeListener, setTemplate, setTransactionIsolationLevel, setTransactionIsolationLevelName, setTransactionManager, setTransactionName, setTransactionTimeout, shutdown, start, stop, unregisterMetrics, waitWhileNotRunning
public void setArchiveHandler(ArchiveOperationHandler archiveHandler)
protected void validateConfiguration()
AbstractEventListenerContainer
validateConfiguration
in class SimplePollingEventListenerContainer
public void initialize()
AbstractEventListenerContainer
true
will call AbstractEventListenerContainer.doStart()
(if it is set to true
,
lifecycle of the container will be controlled by the current space mode). AbstractEventListenerContainer.doInitialize()
will be called for additional initialization after the possible AbstractEventListenerContainer.doStart()
call.public void onEvent(Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source)
SpaceDataEventListener
onEvent
in interface SpaceDataEventListener<Object>
data
- The actual data object of the eventgigaSpace
- A GigaSpace instance that can be used to perform additional operations
against the spacetxStatus
- An optional transaction status allowing to rollback a transaction
programmaticallysource
- Optional additional data or the actual source event data object (where
relevant)public void setBatchSize(int batchSize)
batchSize
- - The maximum number of objects to hand over to the archiver in one method
call. This parameter has affect only if the archive handler ArchiveOperationHandler.supportsBatchArchiving()
public int getBatchSize()
public long getNonBlockingSleep()
public void setNonBlockingSleep(long nonBlockingSleepMilliseconds)
nonBlockingSleepMilliseconds
- - the time to sleep if take returned no values
(milliseconds)public boolean isUseFifoGrouping()
public void setUseFifoGrouping(boolean useFifoGrouping)
Copyright © GigaSpaces.