Berkeley DB: XmlContainer::close
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++

# XmlContainer::close |

`

###

    #include <DbXml.hpp>

    void
    XmlContainer::close(u_int32_t flags);

# Description

The XmlContainer::close method closes the specified container.

The XmlContainer must be in the open state for the call to succeed. The container is only open after a successful call to the XmlContainer::open method. Note that it is allowable to re-open a container after it has been closed.

DB_NOSYNC
  Do not flush cached information to disk. The DB_NOSYNC flag is a dangerous option. It should be set only if the application is doing logging (with transactions) so that the database is recoverable after a system or application crash, or if the database is always generated from scratch after any system or application crash.

  It is important to understand that flushing cached information to disk only minimizes the window of opportunity for corrupted data. Although unlikely, it is possible for database corruption to happen if a system or application crash occurs while writing data to the database. To ensure that database corruption never occurs, applications must either: use transactions and logging with automatic recovery; use logging and application-specific recovery; or edit a copy of the database, and once all applications using the database have successfully called UNREF==xm_close, atomically replace the original database with the updated copy.

When multiple threads are using the XmlContainer concurrently, only a single thread may call the XmlContainer::close method.

# Class

XmlContainer, XmlDocument, XmlQueryContext

# See Also

XmlContainer::close, XmlContainer::declareIndex, XmlContainer::deleteDocument, XmlContainer::getDocument, XmlContainer::getName, XmlContainer::open, XmlContainer::putDocument and XmlContainer::queryWithXPath.

XmlDocument::getAttributeValue, XmlDocument::getContent, XmlDocument::getID, XmlDocument::getName, XmlDocument::getType, XmlDocument::setContent, XmlDocument::setName, and XmlDocument::setType.

`

Copyright Sleepycat Software