public class DefaultArchivePollingContainerExceptionHandler extends Object implements EventExceptionHandler<Object>
ArchivePollingContainer
Filters last exception so it
won't be repeatedly logged more than once per minute.Constructor and Description |
---|
DefaultArchivePollingContainerExceptionHandler() |
DefaultArchivePollingContainerExceptionHandler(long timeWindowsMillis) |
Modifier and Type | Method and Description |
---|---|
long |
getTimeWindowMillis() |
void |
onException(ListenerExecutionFailedException exception,
Object data,
GigaSpace gigaSpace,
org.springframework.transaction.TransactionStatus txStatus,
Object source)
This is the default handler if
#setExceptionHandler(EventExceptionHandler) was not
called. |
void |
onSuccess(Object data,
GigaSpace gigaSpace,
org.springframework.transaction.TransactionStatus txStatus,
Object source)
This is the default handler if
#setExceptionHandler(EventExceptionHandler) was not
called. |
boolean |
shouldLog(ListenerExecutionFailedException exception,
long now) |
void |
storeLastException(ListenerExecutionFailedException exception,
long now) |
public DefaultArchivePollingContainerExceptionHandler()
public DefaultArchivePollingContainerExceptionHandler(long timeWindowsMillis)
public void onSuccess(Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException
#setExceptionHandler(EventExceptionHandler)
was not
called. Does nothing in case of a successful archive operationonSuccess
in interface EventExceptionHandler<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)RuntimeException
public void onException(ListenerExecutionFailedException exception, Object data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException
#setExceptionHandler(EventExceptionHandler)
was not
called. Logs the exception if it has not occured in the last minute.onException
in interface EventExceptionHandler<Object>
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)RuntimeException
public void storeLastException(ListenerExecutionFailedException exception, long now)
public boolean shouldLog(ListenerExecutionFailedException exception, long now)
public long getTimeWindowMillis()
Copyright © GigaSpaces.