Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 1277

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>RandomAccessFileAdapter</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>RandomAccessFileAdapter</h1><div id="TOC"><div id="TOCinner"><span class="TOCtitle">Contents</span><div class="TOCcontents"><ul><li><a href ="#Advantage">Advantage</a></li><li><a href ="#Effect">Effect</a></li><li><a href ="#Alternate Strategies">Alternate Strategies</a></li></ul></li></ul></div></div></div>
<p>This topic applies to db4o versions 6.2 and higher.</p>


<span name="cs_wiki_filter" csw_filters="net"><p>.NET:&nbsp;</p>

<p><code>configuration.Io(new RandomAccessFileAdapter())</code></p>

</span>
<a name="Advantage"></a><h2>Advantage</h2>

<p>Decreases memory consumption by using an IO
adapter without caching.</p>

<a name="Effect"></a><h2>Effect</h2>

<p>Since db4o version 6.2 <a href="../../implementation_strategies/io_adapter/cachedioadapter.html" class="wikiLink">CachedIoAdapter</a>
is used by default. This IO adapter has some valuable advantages, however the
disadvantage is increased memory consumption. Using RandomAccessFileAdapter can help to keep the
memory consumption to the minimum.</p>

<a name="Alternate Strategies"></a><h2>Alternate Strategies</h2>

<p>An alternative way to control the memory consumption is to configure it
in the CachedIoAdapter constructor:</p>



<span name="cs_wiki_filter" csw_filters="net"><p>.NET:&nbsp;</p>

<p><code>configuration.Io(new
CachedIoAdapter(delegateAdapter, page_size, page_count));</code></p>

</span>

<p>page_size
* page_count - will define the maximum amount of memory used for caching.</p></div>
    </div>
    <div id="footer">
					This revision (3) was last Modified 2007-05-07T16:44:32 by Tetyana.
				</div>
  </body>
</html>