diff options
Diffstat (limited to 'libcontextsubscriber/doc/html/updatingcontextproviders.html')
-rw-r--r-- | libcontextsubscriber/doc/html/updatingcontextproviders.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libcontextsubscriber/doc/html/updatingcontextproviders.html b/libcontextsubscriber/doc/html/updatingcontextproviders.html new file mode 100644 index 00000000..eca5ce36 --- /dev/null +++ b/libcontextsubscriber/doc/html/updatingcontextproviders.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> +<title>libcontextsubscriber: </title> +<link href="tabs.css" rel="stylesheet" type="text/css"> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.8 --> +<div class="navigation" id="top"> + <div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul> + </div> +</div> +<div class="contents"> +The update tool (<code>update-contextkit-providers</code>) is used to regenerate the registry cache database.<h2><a class="anchor" name="Overview"> +Overview</a></h2> +Information about keys and providers is normally stored in a system directory in <b>xml</b> format. The xml (being xml) is slow to parse and not efficient as a storage format for data that is mostly static.<p> +It makes sense to store a cached version of the xml registry in a constant-database fast-access format and regenerate it when the xml data changes.<p> +Update tool does exactly that - it reads the xml registry and (re)generates a constant <b>tiny-cdb</b> database containing the cached version of the data in the registry.<h2><a class="anchor" name="Usage"> +Usage</a></h2> +The <code>update-contextkit-providers</code> binary, when launched without parameters, will by default regenerate the database in the default installation prefix. Most likely: <code>"/usr/share/contextkit/providers"</code> . Obviously, for this to be successful, it needs to be launched with proper privileges.<p> +It's possible to override the registry directory with first parameter:<p> +<div class="fragment"><pre class="fragment"> $> update-contextkit-providers /some/path/to/registry +</pre></div><p> +In this case the xml will be read from <code>"/some/path/to/registry"</code> and the resulting database will be written to <code>"/some/path/to/registry/cache.cdb"</code> .<p> +Lastly, the <code>"CONTEXT_PROVIDERS"</code> environment variable can be used to specify a directory containing the registry.<h2><a class="anchor" name="Implementation"> +Implementation</a></h2> +To ensure the registry consistency the regeneration is done atomically: the new database is first written to a temp-named file and then moved over the old one. </div> +<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 23 08:59:23 2009 for libcontextsubscriber by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> +</body> +</html> |