XmlTransaction::createChild

#include <DbXml.hpp>

XmlTransaction XmlTransaction::createChild(u_int32_t flags = 0)

The XmlTransaction::createChild method creates a child transaction of this transaction. While this child transaction is active (has been neither committed nor aborted), the parent transaction may not issue any operations except for XmlTransaction::commit or XmlTransaction::abort.

Parameters

flags

This parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

  • DB_READ_COMMITTED

    This operation will have degree 2 isolation. This provides for cursor stability but not repeatable reads. Data items which have been previously read by this transaction may be deleted or modified by other transactions before this transaction completes.

  • DB_READ_UNCOMMITTED

    This operation will support degree 1 isolation; that is, read operations may return data that has been modified by other transactions but which has not yet been committed. Silently ignored if the DB_READ_UNCOMMITTED flag was not specified when the underlying container was opened.

  • DB_TXN_NOSYNC

    Do not synchronously flush the log when this transaction commits or prepares. This means the transaction will exhibit the ACI (atomic, consistent, and isolated) properties, but not D (durable); that is, database integrity will be maintained but it is possible that this transaction may be undone during recovery.

    This behavior may be set for a Berkeley DB environment using the DbEnv::set_flags() method. Any value specified to this method overrides that setting.

  • DBXML_IGNORE_LEASE

    This flag is relevant only when using a replicated environment.

    Perform transactional operations irrespective of the state of master leases. The transactional operations will perform under all conditions: if master leases are not configured, if the request is made to a client, if the request is made to a master with a valid lease, or if the request is made to a master without a valid lease.

    Refer to Master Leases in the Berkeley DB Programmer's Reference Guide for more information.

  • DB_TXN_NOWAIT

    If a lock is unavailable for any Berkeley DB operation performed in the context of this transaction, cause the operation to return DB_LOCK_DEADLOCK or throw an XmlException with DB error code DB_LOCK_DEADLOCK immediately instead of blocking on the lock.

  • DB_TXN_SNAPSHOT

    This transaction will execute with snapshot isolation. For containers with the DB_MULTIVERSION flag set, data values will be read as they are when the transaction begins, without taking read locks. Silently ignored for operations on databases with DB_MULTIVERSION not set on the underlying container (read locks are acquired).

    The DB_LOCK_DEADLOCK error is returned from update operations if a snapshot transaction attempts to update data which was modified after the snapshot transaction read it.

  • DB_TXN_SYNC

    Synchronously flush the log when this transaction commits or prepares. This means the transaction will exhibit all of the ACID (atomic, consistent, isolated, and durable) properties.

    This behavior is the default for Berkeley DB environments unless the DB_TXN_NOSYNC flag was specified to the DbEnv::set_flags() method. Any value specified to this method overrides that setting.

Class

XmlTransaction

See Also

XmlTransaction Methods