org.openspaces.archive
Class ArchivePollingContainer
java.lang.Object
  
org.openspaces.events.AbstractSpaceListeningContainer
      
org.openspaces.events.AbstractEventListenerContainer
          
org.openspaces.events.AbstractTemplateEventListenerContainer
              
org.openspaces.events.AbstractTransactionalEventListenerContainer
                  
org.openspaces.events.polling.AbstractPollingEventListenerContainer
                      
org.openspaces.events.polling.SimplePollingEventListenerContainer
                          
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.
- Since:
 
  - 9.1.1
 
- Author:
 
  - Itai Frenkel
 
 
 
 
 
 
 
 
 
| Methods inherited from class org.openspaces.events.polling.SimplePollingEventListenerContainer | 
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 org.openspaces.events.polling.AbstractPollingEventListenerContainer | 
doReceiveAndExecute, getReceiveOperationHandler, getReceiveTimeout, getTriggerOperationHandler, isPassArrayAsIs, receiveAndExecute, receiveEvent, setPassArrayAsIs, setReceiveOperationHandler, setReceiveTimeout, setTriggerOperationHandler | 
 
 
 
| Methods inherited from class org.openspaces.events.AbstractEventListenerContainer | 
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, getExceptionHandler, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef, setExceptionHandler | 
 
| Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer | 
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 | 
 
ArchivePollingContainer
public ArchivePollingContainer()
setArchiveHandler
public void setArchiveHandler(ArchiveOperationHandler archiveHandler)
 
 
validateConfiguration
protected void validateConfiguration()
- Description copied from class: 
AbstractSpaceListeningContainer 
- Validate the configuration of this container.
- Overrides:
 validateConfiguration in class AbstractPollingEventListenerContainer
 
 
 
initialize
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.
- Overrides:
 initialize in class SimplePollingEventListenerContainer
 
- See Also:
 AbstractSpaceListeningContainer.onApplicationEvent(org.springframework.context.ApplicationEvent)
 
 
onEvent
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>
 
- Parameters:
 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)
 
 
setBatchSize
public void setBatchSize(int batchSize)
 
- Parameters:
 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()
 
getBatchSize
public int getBatchSize()
 
 
getNonBlockingSleep
public long getNonBlockingSleep()
 
 
setNonBlockingSleep
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.
 
- Parameters:
 nonBlockingSleepMilliseconds - - the time to sleep if take returned no values (milliseconds)
 
 
isUseFifoGrouping
public boolean isUseFifoGrouping()
 
 
setUseFifoGrouping
public void setUseFifoGrouping(boolean useFifoGrouping)
- Enables take operations that are performed with FIFO Grouping enabled
 
 
 
Copyright © GigaSpaces.