Documentation Home
MySQL NDB Cluster API Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 3.6Mb
PDF (A4) - 3.6Mb


4.3.1.24 Transaction

Transaction represents a user transaction active in the cluster.

4.3.1.24.1 Synopsis
 public interface Transaction {
// Public Methods  public abstract void begin();
  public abstract void commit();
  public abstract boolean getRollbackOnly();
  public abstract boolean isActive();
  public abstract void rollback();
  public abstract void setRollbackOnly();
}
4.3.1.24.2 begin()
public abstract void begin();

Begin a transaction.

4.3.1.24.3 commit()
public abstract void commit();

Commit a transaction.

4.3.1.24.4 getRollbackOnly()
public abstract boolean getRollbackOnly();

Has this transaction been marked for rollback only?

Table 4.75 getRollbackOnly()

Parameter Description
return true if the transaction has been marked for rollback only

4.3.1.24.5 isActive()
public abstract boolean isActive();

Is there a transaction currently active?

Table 4.76 isActive()

Parameter Description
return true if a transaction is active

4.3.1.24.6 rollback()
public abstract void rollback();

Roll back a transaction.

4.3.1.24.7 setRollbackOnly()
public abstract void setRollbackOnly();

Mark this transaction as rollback only. After this method is called, commit() will roll back the transaction and throw an exception; rollback() will roll back the transaction and not throw an exception.