The update tool (update-contextkit-providers) is used to regenerate the registry cache database.

Overview

Information about keys and providers is normally stored in a system directory in xml format. The xml (being xml) is slow to parse and not efficient as a storage format for data that is mostly static.

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.

Update tool does exactly that - it reads the xml registry and (re)generates a constant tiny-cdb database containing the cached version of the data in the registry.

Usage

The update-contextkit-providers binary, when launched without parameters, will by default regenerate the database in the default installation prefix. Most likely: "/usr/share/contextkit/providers" . Obviously, for this to be successful, it needs to be launched with proper privileges.

It's possible to override the registry directory with first parameter:

   $> update-contextkit-providers /some/path/to/registry

In this case the xml will be read from "/some/path/to/registry" and the resulting database will be written to "/some/path/to/registry/cache.cdb" .

Lastly, the "CONTEXT_PROVIDERS" environment variable can be used to specify a directory containing the registry.

Implementation

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.

Generated on Thu Feb 21 18:31:19 2013 for libcontextsubscriber by  doxygen 1.5.6