ca.mcgill.sel.aspectoptima.interfacing
Class AspectOPTIMA

java.lang.Object
  extended by ca.mcgill.sel.aspectoptima.interfacing.AspectOPTIMA

public class AspectOPTIMA
extends java.lang.Object

Facade for the AspectOPTIMA framework providing access to all functionality


Constructor Summary
AspectOPTIMA()
           
 
Method Summary
static boolean abortTransaction()
          Aborts the transaction that is associated to the currently active thread.
static boolean beginChildTransaction()
          Begins a nested transaction as a child of the transaction that is associated to the currently active thread using the configuration parameters of the parent transaction.
static boolean beginTransaction(java.lang.String updateStrategy, java.lang.String concurrencyControl, boolean nested)
          Begins a transaction using the passed update strategy and concurrency control mechanism.
static boolean commitTransaction()
          Commits the transaction that is associated to the currently active thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AspectOPTIMA

public AspectOPTIMA()
Method Detail

abortTransaction

public static boolean abortTransaction()
Aborts the transaction that is associated to the currently active thread.

Returns:
true if the current transaction was successfully aborted, false in case of any error

beginChildTransaction

public static boolean beginChildTransaction()
Begins a nested transaction as a child of the transaction that is associated to the currently active thread using the configuration parameters of the parent transaction.

Returns:
true if the corresponding transaction was successfully started, false in case of any error

beginTransaction

public static boolean beginTransaction(java.lang.String updateStrategy,
                                       java.lang.String concurrencyControl,
                                       boolean nested)
Begins a transaction using the passed update strategy and concurrency control mechanism. Allows for nested transactions if the parameter nested is true.

Parameters:
updateStrategy - "CHECKPOINTING" or "DEFERRING"
concurrencyControl - "TWOPHASELOCKING" or "OPTIMISTICVALIDATION"
nested - whether nested child transactions should be allowed or not
Returns:
true if the corresponding transaction was successfully started, false in case of any error

commitTransaction

public static boolean commitTransaction()
Commits the transaction that is associated to the currently active thread.

Returns:
true if the current transaction was successfully committed, false in case of any error