org.wso2.carbon.registry.core.dataaccess
Interface DatabaseTransaction

All Known Implementing Classes:
JDBCDatabaseTransaction

public interface DatabaseTransaction

This class represents a database transaction, which is used to support consistency and concurrency. A database transaction is utilized by the Transaction API, to provide database access to the registry.


Method Summary
 void decNestedDepth()
          This method will decrement the nested depth of the transaction on the current session.
 int getNestedDepth()
          Method to obtain the depth of nesting of this transaction at a given point in time.
 void incNestedDepth()
          This method will increment the nested depth of the transaction on the current session.
 boolean isRollbacked()
          Method to determine whether this transaction has been rollbacked at least once.
 boolean isStarted()
          Method to determine whether a transaction is started or not.
 void popTransaction()
          Pop stacked transaction and replace the existing one with that.
 void pushTransaction()
          Push current transaction to a stack and make room for a new one.
 void setRollbacked(boolean rollbacked)
          Method to set whether this transaction has been rollbacked or not.
 void setStarted(boolean started)
          Method to set whether a transaction is started or not.
 

Method Detail

pushTransaction

void pushTransaction()
Push current transaction to a stack and make room for a new one.


popTransaction

void popTransaction()
Pop stacked transaction and replace the existing one with that.


isStarted

boolean isStarted()
Method to determine whether a transaction is started or not.

Returns:
whether a transaction is started or not.

setStarted

void setStarted(boolean started)
Method to set whether a transaction is started or not.

Parameters:
started - whether a transaction is started or not.

incNestedDepth

void incNestedDepth()
This method will increment the nested depth of the transaction on the current session.


decNestedDepth

void decNestedDepth()
This method will decrement the nested depth of the transaction on the current session.


getNestedDepth

int getNestedDepth()
Method to obtain the depth of nesting of this transaction at a given point in time.

Returns:
the nested depth.

isRollbacked

boolean isRollbacked()
Method to determine whether this transaction has been rollbacked at least once. This applies to the out as well as inner transactions as a whole.

Returns:
whether this transaction has been rollbacked.

setRollbacked

void setRollbacked(boolean rollbacked)
Method to set whether this transaction has been rollbacked or not.

Parameters:
rollbacked - whether this transaction has been rollbacked or not.


Copyright © 2012 WSO2 Inc. All Rights Reserved.