Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

BDBMetadataPlugin Class Reference

#include <BDBMetadataPlugin.h>

Inheritance diagram for BDBMetadataPlugin:

MetadataPlugin Plugin List of all members.

Public Methods

bool init ()
CoreError create (NumID &docid, const Document &document)
CoreError remove (NumID docid)
CoreError update (NumID docid, const Document &document)
CoreError get (NumID docid, Document &document)
CoreError lock (NumID docid, DocumentLock lock)
CoreError getLocks (map< NumID, DocumentLock > &locks)
CoreError query (NumID first, int maxlen, map< NumID, NumID > &updates)

Detailed Description

BDBMetadataPlugin is a real working implementation of MetadataPlugin. It stores metadata in a central BDB database. In the configfile can be specified which datasource.


Member Function Documentation

CoreError BDBMetadataPlugin::create NumID &    docid,
const Document   document
[virtual]
 

Create a document.

Parameters:
docid  the reference that receives the new document ID
document  the new document information
Returns:
error code

Implements MetadataPlugin.

CoreError BDBMetadataPlugin::get NumID    docid,
Document   document
[virtual]
 

Get a document

Parameters:
docid  the document to retrieve
document  the reference that receives the document information
Returns:
error code

Implements MetadataPlugin.

CoreError BDBMetadataPlugin::getLocks map< NumID, DocumentLock > &    locks [virtual]
 

Get the active locks. Useful for cleaning up after a crash.

Parameters:
locks  the reference that receives the document locks
Returns:
error code

Implements MetadataPlugin.

bool BDBMetadataPlugin::init   [virtual]
 

Sets up a connection with an BDB datasource specified in config.

Returns:
true if plugin initialized succesfully, false otherwise

Implements Plugin.

CoreError BDBMetadataPlugin::lock NumID    docid,
DocumentLock    lock
[virtual]
 

Lock the document.

Parameters:
docid  the document ID
lock  the document lock type
Returns:
error code

Implements MetadataPlugin.

CoreError BDBMetadataPlugin::query NumID    first,
int    maxlen,
map< NumID, NumID > &    updates
[virtual]
 

Query document changes since 'first'.

Parameters:
first  the first update to return
maxlen  the maximum number of updates to return
updates  the reference that receives the updates
Returns:
error code

Implements MetadataPlugin.

CoreError BDBMetadataPlugin::remove NumID    docid [virtual]
 

Remove a document.

Parameters:
docid  the document to remove
Returns:
error code

Implements MetadataPlugin.

CoreError BDBMetadataPlugin::update NumID    docid,
const Document   document
[virtual]
 

Update a document

Parameters:
docid  the document that will be updated
document  the updated document information
Returns:
error code

Implements MetadataPlugin.


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18