Berkeley DB XML
version 2.5.16

com.sleepycat.dbxml
Class XmlStatistics

java.lang.Object
  extended by com.sleepycat.dbxml.XmlStatistics

public class XmlStatistics
extends Object

The XmlStatistics class encapsulates statistical information about the number of keys in existence for a given index. Statistics are available for the total number of keys currently in use by the index, as well as the total number of unique keys in use by the index. Use getNumberOfIndexedKeys() and getNumberOfUniqueKeys(), respectively, to retrieve these values.

Be aware that the number of keys maintained for an index is a function of the number and size of documents stored in the container, and of the type of index being examined.

XmlStatistics objects are instantiated by XmlContainer.lookupStatistics(java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue).

This object is thread-safe.


Constructor Summary
XmlStatistics(XmlStatistics arg0)
          Copy constructor.
 
Method Summary
 void delete()
          Free the native resources associated with this object.
 double getNumberOfIndexedKeys()
          Returns the total number of keys contained by the index for which statistics are being reported.
 double getNumberOfUniqueKeys()
          Returns the number of unique keys contained in the index for which statistics are being reported.
 double getSumKeyValueSize()
          Returns the sum of the key/value size, which is a measure of the size of the index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlStatistics

public XmlStatistics(XmlStatistics arg0)
              throws XmlException
Copy constructor.

Throws:
XmlException
Method Detail

delete

public void delete()
Free the native resources associated with this object.


getNumberOfIndexedKeys

public double getNumberOfIndexedKeys()
                              throws XmlException
Returns the total number of keys contained by the index for which statistics are being reported.

Throws:
XmlException

getNumberOfUniqueKeys

public double getNumberOfUniqueKeys()
                             throws XmlException
Returns the number of unique keys contained in the index for which statistics are being reported. There are likely to be many more keys than unique keys in the index because a given key can appear multiple times, once for each document feature on each document that it is referencing.

Throws:
XmlException

getSumKeyValueSize

public double getSumKeyValueSize()
                          throws XmlException
Returns the sum of the key/value size, which is a measure of the size of the index.

Throws:
XmlException

Berkeley DB XML
version 2.5.16

Copyright (c) 1996,2009 Oracle. All rights reserved.