GigaSpaces XAP 9.7.2 API

Class ArchivePollingContainer

  extended by
      extended by
          extended by
              extended by
                  extended by
                      extended by
                          extended by org.openspaces.archive.ArchivePollingContainer
All Implemented Interfaces:
com.gigaspaces.internal.dump.InternalDumpProcessor, EventListener, SpaceDataEventListener<Object>, ServiceDetailsProvider, ServiceMonitorsProvider, Aware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ApplicationListener<ApplicationEvent>, Lifecycle

public class ArchivePollingContainer
extends SimplePollingEventListenerContainer
implements SpaceDataEventListener<Object>

Takes objects specified in the template into the archive handler defined by setArchiveHandler(ArchiveOperationHandler) This container can be used to take (remove) objects from the Space and persist them into an external service.

Itai Frenkel

Field Summary
Fields inherited from class
Fields inherited from class
Fields inherited from class
Fields inherited from class
exceptionHandler, failedEvents, processedEvents
Fields inherited from class
beanName, logger
Constructor Summary
Method Summary
 int getBatchSize()
 long getNonBlockingSleep()
 void initialize()
          Initialize this container.
 boolean isUseFifoGrouping()
 void onEvent(Object data, GigaSpace gigaSpace, 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.
Methods inherited from class
createDefaultTaskExecutor, doAfterStart, doBeforeStop, doInitialize, doRescheduleTask, doShutdown, eventReceived, getActiveConsumerCount, getConcurrentConsumers, getIdleTaskExecutionLimit, getMaxConcurrentConsumers, getMaxEventsPerTask, getName, getScheduledConsumerCount, getServicesDetails, getServicesMonitors, handleListenerSetupFailure, process, recoverAfterListenerSetupFailure, refreshConnectionUntilSuccessful, scheduleNewInvokerIfAppropriate, setConcurrentConsumers, setIdleTaskExecutionLimit, setMaxConcurrentConsumers, setMaxEventsPerTask, setRecoveryInterval, setTaskExecutor, sleepInbetweenRecoveryAttempts
Methods inherited from class
doReceiveAndExecute, getReceiveOperationHandler, getReceiveTimeout, getTriggerOperationHandler, isPassArrayAsIs, receiveAndExecute, receiveEvent, setPassArrayAsIs, setReceiveOperationHandler, setReceiveTimeout, setTriggerOperationHandler
Methods inherited from class
getTransactionDefinition, getTransactionManager, getTransactionManagerName, isTransactional, setDisableTransactionValidation, setTransactionIsolationLevel, setTransactionIsolationLevelName, setTransactionManager, setTransactionName, setTransactionTimeout
Methods inherited from class
getReceiveTemplate, getTemplate, isDynamicTemplate, isPerformSnapshot, setDynamicTemplate, setPerformSnapshot, setTemplate
Methods inherited from class
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, getExceptionHandler, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef, setExceptionHandler
Methods inherited from class
afterPropertiesSet, destroy, doStop, getBeanName, getGigaSpace, getStatus, isActive, isRunning, message, onApplicationEvent, rescheduleTaskIfNecessary, setActiveWhenPrimary, setAutoStart, setBeanName, setGigaSpace, setRegisterSpaceModeListener, shutdown, start, stop, waitWhileNotRunning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ArchivePollingContainer()
Method Detail


public void setArchiveHandler(ArchiveOperationHandler archiveHandler)


protected void validateConfiguration()
Description copied from class: AbstractSpaceListeningContainer
Validate the configuration of this container.

validateConfiguration in class AbstractPollingEventListenerContainer


public void initialize()
Description copied from class: AbstractSpaceListeningContainer
Initialize this container. If this container is not configured with "activeWhenPrimary" flag set to true will call AbstractSpaceListeningContainer.doStart() (if it is set to true, lifecycle of the container will be controlled by the current space mode). AbstractSpaceListeningContainer.doInitialize() will be called for additional initialization after the possible AbstractSpaceListeningContainer.doStart() call.

initialize in class SimplePollingEventListenerContainer
See Also:


public void onEvent(Object data,
                    GigaSpace gigaSpace,
                    TransactionStatus txStatus,
                    Object source)
Description copied from interface: SpaceDataEventListener
An event callback with the actual data object of the event.

Specified by:
onEvent in interface SpaceDataEventListener<Object>
data - The actual data object of the event
gigaSpace - A GigaSpace instance that can be used to perform additional operations against the space
txStatus - An optional transaction status allowing to rollback a transaction programmatically
source - 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#supportsAtomicBatchArchiving()


public int getBatchSize()


public long getNonBlockingSleep()


public void setNonBlockingSleep(long nonBlockingSleepMilliseconds)
In case the space is a proxy to a remote clustered space we use non-blocking take operation for polling. If the take returned without any object the thread sleeps for 100 milliseconds. Use this method to set the sleep timeout to a different value.

nonBlockingSleepMilliseconds - - the time to sleep if take returned no values (milliseconds)


public boolean isUseFifoGrouping()


public void setUseFifoGrouping(boolean useFifoGrouping)
Enables take operations that are performed with FIFO Grouping enabled

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.