You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2015/03/21 01:19:42 UTC

svn commit: r944544 - in /websites/staging/jena/trunk/content: ./ documentation/tdb/store-parameters.html

Author: buildbot
Date: Sat Mar 21 00:19:41 2015
New Revision: 944544

Log:
Staging update by buildbot for jena

Modified:
    websites/staging/jena/trunk/content/   (props changed)
    websites/staging/jena/trunk/content/documentation/tdb/store-parameters.html

Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Mar 21 00:19:41 2015
@@ -1 +1 @@
-1668066
+1668182

Modified: websites/staging/jena/trunk/content/documentation/tdb/store-parameters.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/tdb/store-parameters.html (original)
+++ websites/staging/jena/trunk/content/documentation/tdb/store-parameters.html Sat Mar 21 00:19:41 2015
@@ -144,10 +144,39 @@
     <div class="col-md-12">
     <div id="breadcrumbs"></div>
     <h1 class="title">TDB - Store Parameters</h1>
-  <p>TDB (as of version Jena 2.13.0, TDB 1.1.2) supports configuration of the
+  <p>TDB (as of version Jena 2.13.1, TDB 1.1.3) supports configuration of the
 databases when they are first created and each time an application connects
 to an existing database.  Databases using the default settings built-into
 TDB continue to work exactly as before.</p>
+<h2 id="setting-store-parameters">Setting Store Parameters</h2>
+<p>In TDB, there is exactly one internal object for each dataset in the JVM
+and this is shared between all application datasets for that location of
+persistent storage.</p>
+<p>Setting store parameters is done by setting the internal system state
+before any other access to the disk area occurs. It is not possible to have
+different setups for the same dataset on disk.</p>
+<p><code>StoreParams</code> are set by populating the internal state with the setup
+before a application level dataset is created.</p>
+<div class="codehilite"><pre><span class="n">TDBFactory</span><span class="p">.</span><span class="n">setup</span><span class="p">(</span><span class="n">Location</span> <span class="n">location</span><span class="p">,</span> <span class="n">StoreParams</span> <span class="n">params</span><span class="p">)</span>
+</pre></div>
+
+
+<p>This must be called before any application calls to get a <code>Dataset</code> (or
+<code>DatasetGraph</code>) object otherwise <code>IllegalStateException</code> is thrown by this
+function.</p>
+<div class="codehilite"><pre><span class="n">Location</span> <span class="n">location</span> <span class="p">=</span> <span class="p">...</span> <span class="p">;</span>
+<span class="n">StoreParams</span> <span class="n">customParams</span> <span class="p">=</span> <span class="p">...</span> <span class="p">;</span>
+
+<span class="n">TDBFactory</span><span class="p">.</span><span class="n">setup</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="n">customParams</span><span class="p">)</span> <span class="p">;</span>
+
+<span class="n">Dataset</span> <span class="n">ds</span> <span class="p">=</span> <span class="n">TDBFactory</span><span class="p">.</span><span class="n">createDataset</span><span class="p">(</span><span class="n">location</span><span class="p">)</span> <span class="p">;</span>
+<span class="p">...</span>
+</pre></div>
+
+
+<p>It is only possible to change store parameters by expelling the underlying
+<code>StoreConnection</code>, which looses all caching, and calling
+<code>TDBFactory.setup</code>.  Access to the dataset is then a cold start.</p>
 <h2 id="per-connect-options">Per-connect Options</h2>
 <p>The per-connect options are the ones that can be changed after the database has
 been created and can be different each time the application attaches to the