public interface EventExceptionHandler<T>
If the event container is transactional, then propagating the exception will cause the transaction to rollback, which handling it will cause the transaction to commit.
Modifier and Type | Method and Description |
---|---|
void |
onException(ListenerExecutionFailedException exception,
T data,
GigaSpace gigaSpace,
org.springframework.transaction.TransactionStatus txStatus,
Object source)
A callback to handle exception in an event container.
|
void |
onSuccess(T data,
GigaSpace gigaSpace,
org.springframework.transaction.TransactionStatus txStatus,
Object source)
A callback when a successful execution of a listener.
|
void onSuccess(T data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException
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
void onException(ListenerExecutionFailedException exception, T data, GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus txStatus, Object source) throws RuntimeException
If the event container is transactional, then propagating the exception will cause the transaction to rollback, while handling it will cause the transaction to commit.
The TransactionStatus
can also be used to control
if the transaction should be rolled back without throwing an exception.
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
Copyright © GigaSpaces.