Class DefaultArchivePollingContainerExceptionHandler
java.lang.Object
org.openspaces.archive.DefaultArchivePollingContainerExceptionHandler
- All Implemented Interfaces:
EventExceptionHandler<Object>
public class DefaultArchivePollingContainerExceptionHandler
extends Object
implements EventExceptionHandler<Object>
- Author:
- Itai Frenkel
Logs exceptions from the
ArchivePollingContainerFilters last exception so it won't be repeatedly logged more than once per minute.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidonException(ListenerExecutionFailedException exception, Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) This is the default handler ifwas not called.invalid reference
#setExceptionHandler(EventExceptionHandler)voidonSuccess(Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) This is the default handler ifwas not called.invalid reference
#setExceptionHandler(EventExceptionHandler)booleanshouldLog(ListenerExecutionFailedException exception, long now) voidstoreLastException(ListenerExecutionFailedException exception, long now)
-
Constructor Details
-
DefaultArchivePollingContainerExceptionHandler
public DefaultArchivePollingContainerExceptionHandler() -
DefaultArchivePollingContainerExceptionHandler
public DefaultArchivePollingContainerExceptionHandler(long timeWindowsMillis)
-
-
Method Details
-
onSuccess
public void onSuccess(Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException This is the default handler ifwas not called. Does nothing in case of a successful archive operationinvalid reference
#setExceptionHandler(EventExceptionHandler)- Specified by:
onSuccessin interfaceEventExceptionHandler<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)- Throws:
RuntimeException
-
onException
public void onException(ListenerExecutionFailedException exception, Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException This is the default handler ifwas not called. Logs the exception if it has not occured in the last minute.invalid reference
#setExceptionHandler(EventExceptionHandler)- Specified by:
onExceptionin interfaceEventExceptionHandler<Object>- Parameters:
exception- The listener thrown exceptiondata- 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)- Throws:
RuntimeException
-
storeLastException
-
shouldLog
-
getTimeWindowMillis
public long getTimeWindowMillis()
-