Package org.openspaces.core.transaction
Interface TransactionProvider
- All Superinterfaces:
AutoCloseable,Closeable,SpaceTransactionProvider
- All Known Implementing Classes:
DefaultTransactionProvider
A transaction provider is used to support declarative transactions. It is usually used with a
GigaSpace implementation to declaratively provide on going
transactions to JavaSpace APIs.
The transaction provider usually interacts with a transaction manager (for example, Spring's
PlatformTransactionManager) in order to get the current
running transactions. It allows a transactional context to be passed to the current transaction
method, though it doesn't have to be used.
- Author:
- kimchy
-
Method Summary
Modifier and TypeMethodDescriptiongetCurrentTransaction(Object transactionalContext, IJSpace space) Returns the currently running transaction (usually managed externally/declarative).intgetCurrentTransactionIsolationLevel(Object transactionalContext) Returns the currently running transaction isolation level (mapping to SpringTransactionDefinition.getIsolationLevel()values).Methods inherited from interface com.gigaspaces.transaction.SpaceTransactionProvider
getCurrentTransaction, getCurrentTransactionIsolationLevel, isEnabled
-
Method Details
-
getCurrentTransaction
Returns the currently running transaction (usually managed externally/declarative). A transactional context can be passed and optionally used in order to fetch the current running transaction.If no transaction is currently executing,
nullvalue will be returned. This usually means that the operation will be performed without a transaction.- Parameters:
transactionalContext- Transactional context to (optionally) fetch the transaction byspace- The actual Space this operation will be performed on- Returns:
- The transaction object to be used with
IJSpaceoperations. Can benull.
-
getCurrentTransactionIsolationLevel
Returns the currently running transaction isolation level (mapping to SpringTransactionDefinition.getIsolationLevel()values). A transactional context can be passed and optionally used in order to fetch the current running transaction.- Parameters:
transactionalContext- Transactional context to (optionally) fetch the transaction by- Returns:
- The transaction isolation level mapping to Spring
TransactionDefinition.getIsolationLevel().
-