Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 704

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Built-in db4o collections</title>
    <link rel="stylesheet" type="text/css" href="../../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Built-in db4o collections</h1>

<p>Db4o provides its own built-in collection implementation to improve performance and decrease memory consumption:</p>



<p><span name="cs_wiki_filter" csw_filters="net"></p>
<p>.NET: </p><p><code>IObjectContainer.Ext().Collections.NewLinkedList(); <br>IObjectContainer.Ext().Collections.NewHashMap();
<br>IObjectContainer.Ext().Collections.NewIdentityHashMap(); </code></p>
</span>

<p>
The LinkedList implementation only holds the first and the last elements in RAM, all the other objects are loaded on demand. Apparently, this implementation provides good performance for sequential traversal, but it is still quite inefficient for random selection/update. </p>
<p>The HashMap implementation only holds an array of hash values in RAM and loads keys and objects on demand. </p>
<p>Db4o collections also provide the following functionality, which helps a programmer to produce expected results with as little work as possible:</p>
<ul>
<li>Newly added objects are automatically persisted.</li>
<li>Collection elements are automatically activated, when they are needed. The activation depth is configurable with <i>Db4oCollection#activationDepth(int)</i></li>
<li>Removed objects can be deleted automatically, if the list is configured with <i>Db4oCollection#deleteRemoved(boolean)</i></li>
</ul>
<p>Weak Reference system ensures that objects are freed from RAM, as soon as there are no references to them.</p>
<p>These implementations can be faster for some cases and slower for others.</p></div>
    </div>
    <div id="footer">
					This revision (7) was last Modified 2007-02-21T06:03:33 by Tetyana.
				</div>
  </body>
</html>