tmud-2.10.0/benchmark/
tmud-2.10.0/cmd/
tmud-2.10.0/cmd/objects/
tmud-2.10.0/cmd/tiny/
tmud-2.10.0/doc/classes/Acceptor.src/
tmud-2.10.0/doc/classes/BoolExpParser.src/
tmud-2.10.0/doc/classes/CacheStats.src/
tmud-2.10.0/doc/classes/Character.src/
tmud-2.10.0/doc/classes/Client.src/
tmud-2.10.0/doc/classes/ColorFilter.src/
tmud-2.10.0/doc/classes/Command.src/
tmud-2.10.0/doc/classes/Configuration.src/
tmud-2.10.0/doc/classes/Connector.src/
tmud-2.10.0/doc/classes/ConsoleClient.src/
tmud-2.10.0/doc/classes/CursesClient.src/
tmud-2.10.0/doc/classes/DebugFilter.src/
tmud-2.10.0/doc/classes/Dumper.src/
tmud-2.10.0/doc/classes/Engine.src/
tmud-2.10.0/doc/classes/Event.src/
tmud-2.10.0/doc/classes/EventManager.src/
tmud-2.10.0/doc/classes/Exit.src/
tmud-2.10.0/doc/classes/Farts/AttributeSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/CallSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/CommandSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/CommentSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/EndSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/IfSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/Interpreter.src/
tmud-2.10.0/doc/classes/Farts/Lexer.src/
tmud-2.10.0/doc/classes/Farts/Lib.src/
tmud-2.10.0/doc/classes/Farts/LiteralSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/LocalVarSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/Parser.src/
tmud-2.10.0/doc/classes/Farts/ProgramSyntaxNode.src/
tmud-2.10.0/doc/classes/Farts/SyntaxNode.src/
tmud-2.10.0/doc/classes/Filter.src/
tmud-2.10.0/doc/classes/LineIO.src/
tmud-2.10.0/doc/classes/Loader.src/
tmud-2.10.0/doc/classes/Log.src/
tmud-2.10.0/doc/classes/Module.src/
tmud-2.10.0/doc/classes/ObjCmd.src/
tmud-2.10.0/doc/classes/PacketIO.src/
tmud-2.10.0/doc/classes/ProtocolStack.src/
tmud-2.10.0/doc/classes/Publisher.src/
tmud-2.10.0/doc/classes/Reactor.src/
tmud-2.10.0/doc/classes/Room.src/
tmud-2.10.0/doc/classes/SQLite/
tmud-2.10.0/doc/classes/SQLite/Database.src/
tmud-2.10.0/doc/classes/SQLite3/
tmud-2.10.0/doc/classes/SQLite3/Database.src/
tmud-2.10.0/doc/classes/Script.src/
tmud-2.10.0/doc/classes/Session.src/
tmud-2.10.0/doc/classes/SockIO.src/
tmud-2.10.0/doc/classes/String.src/
tmud-2.10.0/doc/classes/TerminalFilter.src/
tmud-2.10.0/doc/classes/TernaryTrie.src/
tmud-2.10.0/doc/classes/TernaryTrie/
tmud-2.10.0/doc/classes/TernaryTrie/TNode.src/
tmud-2.10.0/doc/classes/Timer.src/
tmud-2.10.0/doc/classes/Utility.src/
tmud-2.10.0/doc/classes/XmlStore.src/
tmud-2.10.0/doc/classes/YamlStore.src/
tmud-2.10.0/doc/dot/
tmud-2.10.0/doc/files/cmd/objects/
tmud-2.10.0/doc/files/cmd/tiny/
tmud-2.10.0/doc/files/lib/
tmud-2.10.0/doc/files/lib/engine/
tmud-2.10.0/doc/files/lib/farts/
tmud-2.10.0/doc/files/tclient_rb.src/
tmud-2.10.0/doc/files/tmud_rb.src/
tmud-2.10.0/farts/
tmud-2.10.0/lib/
tmud-2.10.0/lib/core/
tmud-2.10.0/lib/engine/
tmud-2.10.0/lib/farts/
tmud-2.10.0/logs/
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: GdbmStore</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">GdbmStore</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/storage/gdbmstore_rb.html">
                lib/storage/gdbmstore.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="Store.html">
                Store
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="RECT" coords="33,113,116,161"      href="GdbmStore.html" alt="GdbmStore
">
  <area shape="RECT" coords="39,17,111,65"      href="Store.html" alt="Store
">
</map>
<img src="../dot/f_44.png" usemap="#map" border=0 alt="TopLevel">
    </div>

    <div id="description">
      <p>
The <a href="GdbmStore.html">GdbmStore</a> class manages access to all
object storage.
</p>
<dl>
<dt><tt>db</tt></dt><dd>is a handle to the database.

</dd>
<dt><tt>dbtop</tt></dt><dd>stores the highest id used in the database.

</dd>
<dt><tt>cache</tt></dt><dd>is a handle to the cache

</dd>
</dl>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000209">check</a>&nbsp;&nbsp;
      <a href="#M000204">close</a>&nbsp;&nbsp;
      <a href="#M000207">delete</a>&nbsp;&nbsp;
      <a href="#M000213">each</a>&nbsp;&nbsp;
      <a href="#M000208">get</a>&nbsp;&nbsp;
      <a href="#M000205">inspect</a>&nbsp;&nbsp;
      <a href="#M000211">makenoswap</a>&nbsp;&nbsp;
      <a href="#M000212">makeswap</a>&nbsp;&nbsp;
      <a href="#M000210">mark</a>&nbsp;&nbsp;
      <a href="#M000202">new</a>&nbsp;&nbsp;
      <a href="#M000206">put</a>&nbsp;&nbsp;
      <a href="#M000203">save</a>&nbsp;&nbsp;
      <a href="#M000214">stats</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000202" class="method-detail">
        <a name="M000202"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000202.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000202.html');return false;">
          <span class="method-name">new</span><span class="method-args">(dbfile)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000209" class="method-detail">
        <a name="M000209"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000209.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000209.html');return false;">
          <span class="method-name">check</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Check if an object is in the database by its id.
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the id to use in the search.

</dd>
<dt><tt>return</tt></dt><dd>true or false

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000204" class="method-detail">
        <a name="M000204"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000204.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000204.html');return false;">
          <span class="method-name">close</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Close the database
</p>
<dl>
<dt><tt>return</tt></dt><dd>Undefined.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000207" class="method-detail">
        <a name="M000207"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000207.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000207.html');return false;">
          <span class="method-name">delete</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Deletes an object from the database.
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the id to to be deleted.

</dd>
<dt><tt>return</tt></dt><dd>Undefined.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000213" class="method-detail">
        <a name="M000213"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000213.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000213.html');return false;">
          <span class="method-name">each</span><span class="method-args">() {|@cache.get(k)}| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Iterate through all objects This needs to have all the possible keys first.
So we need to fetch them from the cache and from the database and and
produce a list of unique keys.
</p>
<dl>
<dt><tt>yield</tt></dt><dd>Each object in database to block of caller.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000208" class="method-detail">
        <a name="M000208"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000208.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000208.html');return false;">
          <span class="method-name">get</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Finds an object in the database by its id.
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the id to use in the search.

</dd>
<dt><tt>return</tt></dt><dd>Handle to the object or nil.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000205" class="method-detail">
        <a name="M000205"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000205.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000205.html');return false;">
          <span class="method-name">inspect</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
inspect the store cache (only for caches)
</p>
<dl>
<dt><tt>return</tt></dt><dd>string

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000211" class="method-detail">
        <a name="M000211"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000211.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000211.html');return false;">
          <span class="method-name">makenoswap</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Marks an object nonswappable
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the object id

</dd>
<dt><tt>return</tt></dt><dd>undefined

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000212" class="method-detail">
        <a name="M000212"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000212.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000212.html');return false;">
          <span class="method-name">makeswap</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Marks an object swappable
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the object id

</dd>
<dt><tt>return</tt></dt><dd>undefined

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000210" class="method-detail">
        <a name="M000210"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000210.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000210.html');return false;">
          <span class="method-name">mark</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Marks an object dirty
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the id to use in the search.

</dd>
<dt><tt>return</tt></dt><dd>undefined

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000206" class="method-detail">
        <a name="M000206"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000206.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000206.html');return false;">
          <span class="method-name">put</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Adds a new object to the database.
</p>
<dl>
<dt><tt>obj</tt></dt><dd>is a reference to object to be added

</dd>
<dt><tt>return</tt></dt><dd>Undefined.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000203" class="method-detail">
        <a name="M000203"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000203.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000203.html');return false;">
          <span class="method-name">save</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Save the world
</p>
<dl>
<dt><tt>return</tt></dt><dd>Undefined.

</dd>
</dl>
        </div>
      </div>

      <div id="method-M000214" class="method-detail">
        <a name="M000214"></a>

        <div class="method-heading">
          <a href="GdbmStore.src/M000214.html" target="Code" class="method-signature"
            onclick="popupCode('GdbmStore.src/M000214.html');return false;">
          <span class="method-name">stats</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
produces a statistical report of the database
</p>
<dl>
<dt><tt>return</tt></dt><dd>a string containing the report

</dd>
</dl>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>