Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual
PDF (US Ltr) - 4.4Mb
PDF (A4) - 4.4Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.9Mb
HTML Download (Zip) - 1.9Mb


4.3.1.23 Transaction

Transaction represents a user transaction active in the cluster.

4.3.1.23.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();
}

Figure 4.22 Transaction Class

Transaction Class

4.3.1.23.2 begin()
public abstract void begin();

Begin a transaction.

4.3.1.23.3 commit()
public abstract void commit();

Commit a transaction.

4.3.1.23.4 getRollbackOnly()
public abstract boolean getRollbackOnly();

Has this transaction been marked for rollback only?

Parameters

return

true if the transaction has been marked for rollback only

4.3.1.23.5 isActive()
public abstract boolean isActive();

Is there a transaction currently active?

Parameters

return

true if a transaction is active

4.3.1.23.6 rollback()
public abstract void rollback();

Roll back a transaction.

4.3.1.23.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.


User Comments
Sign Up Login You must be logged in to post a comment.