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


4.3.1.22 Transaction

Transaction represents a user transaction active in the cluster.

4.3.1.22.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.21 Transaction Class

Transaction Class

4.3.1.22.2 begin()
public abstract void begin();

Begin a transaction.

4.3.1.22.3 commit()
public abstract void commit();

Commit a transaction.

4.3.1.22.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.22.5 isActive()
public abstract boolean isActive();

Is there a transaction currently active?

Parameters

return

true if a transaction is active

4.3.1.22.6 rollback()
public abstract void rollback();

Roll back a transaction.

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