GigaSpaces XAP 7.0 API

org.openspaces.core.transaction
Interface TransactionProvider

All Known Implementing Classes:
DefaultTransactionProvider

public interface TransactionProvider

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
 net.jini.core.transaction.Transaction.Created getCurrentTransaction(Object transactionalContext, IJSpace space)
          Returns the currently running transaction (usually managed externally/declarative).
 int getCurrentTransactionIsolationLevel(Object transactionalContext)
          Returns the currently running transaction isolation level (mapping to Spring TransactionDefinition.getIsolationLevel() values).
 boolean isEnabled()
          Returns true if this transaction provider is enabled or not.
 

Method Detail

getCurrentTransaction

net.jini.core.transaction.Transaction.Created getCurrentTransaction(Object transactionalContext,
                                                                    IJSpace space)
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, null value will be returned. This usually means that the operation will be performed without a transaction.

Parameters:
transactionalContext - Transactional context to (optionally) fetch the transcation by
space - The actual Space this operation will be perfomed on
Returns:
The transaction object to be used with IJSpace operations. Can be null.

getCurrentTransactionIsolationLevel

int getCurrentTransactionIsolationLevel(Object transactionalContext)
Returns the currently running transaction isolation level (mapping to Spring TransactionDefinition.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 transcation by
Returns:
The transaction isolation level mapping to Spring TransactionDefinition.getIsolationLevel().

isEnabled

boolean isEnabled()
Returns true if this transaction provider is enabled or not.


GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.