| 
 | GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.events.AbstractSpaceListeningContainer
org.openspaces.events.AbstractEventListenerContainer
org.openspaces.events.AbstractTemplateEventListenerContainer
org.openspaces.events.AbstractTransactionalEventListenerContainer
org.openspaces.events.asyncpolling.SimpleAsyncPollingEventListenerContainer
public class SimpleAsyncPollingEventListenerContainer
Async polling event container uses the space async operation capabilities (such as
 GigaSpace.asyncTake(Object) in order to simulate events
 (optionally transactional).
 
Actual event listener is perfomed in an AsyncFutureListener, and once the result
 is processed, another async operation is perfomed. This allows to require no threads running
 and perfoming the blocking take operation as is the case with the SimplePollingEventListenerContainer.
 
The number of async operarions executed on startup can be controlled using setConcurrentConsumers(int).
 The rest of the operations will be driven by the results arriving, but in essence, there will be concurrent async
 operations performed based on the inital number of concurrent consumers.
 
The actual execution of an async operation is abstracted using AsyncOperationHandler
 with default implementation for take, read, and exclusive read lock.
| Field Summary | |
|---|---|
| static long | DEFAULT_RECEIVE_TIMEOUTThe default receive timeout: 60000 ms = 60 seconds = 1 minute. | 
| Fields inherited from class org.openspaces.events.AbstractEventListenerContainer | 
|---|
| exceptionHandler, failedEvents, processedEvents | 
| Fields inherited from class org.openspaces.events.AbstractSpaceListeningContainer | 
|---|
| beanName, logger | 
| Constructor Summary | |
|---|---|
| SimpleAsyncPollingEventListenerContainer() | |
| Method Summary | |
|---|---|
| protected  void | doAfterStart() | 
| protected  void | doInitialize()A callback to perform custom initialization steps. | 
| protected  void | doShutdown()Perform any custom shutdown operations. | 
|  String | getName() | 
| protected  long | getReceiveTimeout()Returns the timeout used for receive calls, in millisecond. | 
|  ServiceDetails[] | getServicesDetails()Retruns one or more service details that the service exposes. | 
|  ServiceMonitors[] | getServicesMonitors()Retruns one or more service details that the service exposes. | 
|  void | initialize()Initialize this container. | 
|  void | process(com.gigaspaces.internal.dump.InternalDump dump) | 
|  void | setAsyncOperationHandler(AsyncOperationHandler asyncOperationHandler)Sets the async operation handler abstracting the actual async operation perfomred. | 
|  void | setConcurrentConsumers(int concurrentConsumers)Sets the number of concurrent async operation performed by this container. | 
|  void | setReceiveTimeout(long receiveTimeout)Set the timeout to use for receive calls, in milliseconds. | 
| Methods inherited from class org.openspaces.events.AbstractTemplateEventListenerContainer | 
|---|
| afterPropertiesSet, getReceiveTemplate, getTemplate, isPerformSnapshot, setPerformSnapshot, setTemplate | 
| 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 | 
|---|
| destroy, doBeforeStop, doRescheduleTask, 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 | 
| Field Detail | 
|---|
public static final long DEFAULT_RECEIVE_TIMEOUT
| Constructor Detail | 
|---|
public SimpleAsyncPollingEventListenerContainer()
| Method Detail | 
|---|
public void setReceiveTimeout(long receiveTimeout)
NOTE: This value needs to be smaller than the transaction timeout used by the transaction manager (in the appropriate unit, of course).
GigaSpace.take(Object,long)protected long getReceiveTimeout()
public void setAsyncOperationHandler(AsyncOperationHandler asyncOperationHandler)
public void setConcurrentConsumers(int concurrentConsumers)
public ServiceDetails[] getServicesDetails()
ServiceDetailsProvider
getServicesDetails in interface ServiceDetailsProviderpublic ServiceMonitors[] getServicesMonitors()
ServiceMonitorsProvider
getServicesMonitors in interface ServiceMonitorsProviderpublic String getName()
getName in interface com.gigaspaces.internal.dump.InternalDumpProcessor
public void process(com.gigaspaces.internal.dump.InternalDump dump)
             throws com.gigaspaces.internal.dump.InternalDumpProcessorFailedException
process in interface com.gigaspaces.internal.dump.InternalDumpProcessorcom.gigaspaces.internal.dump.InternalDumpProcessorFailedException
public void initialize()
                throws DataAccessException
AbstractSpaceListeningContainertrue 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 AbstractTransactionalEventListenerContainerDataAccessExceptionAbstractSpaceListeningContainer.onApplicationEvent(org.springframework.context.ApplicationEvent)
protected void doInitialize()
                     throws DataAccessException
AbstractSpaceListeningContainer
doInitialize in class AbstractSpaceListeningContainerDataAccessException
protected void doShutdown()
                   throws DataAccessException
AbstractSpaceListeningContainer
doShutdown in class AbstractSpaceListeningContainerDataAccessExceptionAbstractSpaceListeningContainer.shutdown()
protected void doAfterStart()
                     throws DataAccessException
doAfterStart in class AbstractSpaceListeningContainerDataAccessException| 
 | GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||