|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.dbxml.XmlTransaction
public class XmlTransaction
The XmlTransaction class is the handle for a transaction. It
encapsulates a Transaction
object. Methods off the
XmlTransaction class are used to abort and commit the
transaction. XmlTransaction handles are provided to
XmlContainer
, XmlManager
, and other objects that query
and modify documents and containers in order to transactionally protect
those database operations.
XmlTransaction objects are instantiated using
XmlManager.createTransaction()
.
XmlTransaction handles are not free-threaded; transactions
handles may be used by multiple threads, but only serially, that is, the
application must serialize access to the XmlTransaction handle.
Once the abort()
or commit()
methods are called, the handle may not be accessed again, regardless of
the method's return. In addition, parent transactions may not issue any
operations while they have active child transactions (child transactions
that have not yet been committed or aborted) except for
abort()
and commit()
.
Constructor Summary | |
---|---|
XmlTransaction()
|
Method Summary | |
---|---|
void |
abort()
Cause an abnormal termination of the transaction. |
void |
commit()
End the transaction. |
void |
commitNoSync()
End the transaction without flushing the log. |
void |
commitSync()
End the transaction and synchronously flush the log. |
void |
delete()
Free the native resources associated with this object. |
Transaction |
getTransaction()
Get the transaction handle encapsulated by this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlTransaction()
Method Detail |
---|
public void delete()
public Transaction getTransaction() throws XmlException
XmlException
public void abort() throws XmlException
In the case of nested transactions, aborting a parent transaction causes all children (unresolved or not) of the parent transaction to be aborted.
After this method has been called, regardless of its return, the XmlTransaction
method handle may not be accessed again.
XmlException
public void commit() throws XmlException
After this method has been called, regardless of its return, the XmlTransaction
handle may not be accessed again. If this method encounters an error, the transaction and all child transactions of the transaction are aborted.
XmlException
public void commitSync() throws XmlException
After this method has been called, regardless of its return, the XmlTransaction
handle may not be accessed again. If this method encounters an error, the transaction and all child transactions of the transaction are aborted.
XmlException
public void commitNoSync() throws XmlException
After this method has been called, regardless of its return, the XmlTransaction
handle may not be accessed again. If this method encounters an error, the transaction and all child transactions of the transaction are aborted.
XmlException
|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |