strus  0.17
Public Types | Public Member Functions | List of all members
strus::StorageInterface Class Referenceabstract

Interface to the create and alter a storage for strus. More...

#include <storageInterface.hpp>

Public Types

enum  ConfigType { CmdCreateClient, CmdCreate }
 Enumeration of different type of configurations Needed for getting the correct description of the configuration. More...
 

Public Member Functions

virtual ~StorageInterface ()
 Destructor. More...
 
virtual StorageClientInterfacecreateClient (const std::string &configsource, const DatabaseInterface *database, const StatisticsProcessorInterface *statisticsProc=0) const =0
 Creates an client instance of the storage using a defined key value store database. More...
 
virtual bool createStorage (const std::string &configsource, const DatabaseInterface *database) const =0
 Creates a new storage described with configsource using a defined key value store database. More...
 
virtual
StorageAlterMetaDataTableInterface
createAlterMetaDataTable (const std::string &configsource, const DatabaseInterface *database) const =0
 Create an interface to alter the meta data table structure. More...
 
virtual const char * getConfigDescription (const ConfigType &type) const =0
 Gets a configuration description (source string as used by the functions here) createStorage(const std::string&) and createClient(const std::string&) for the usage printed by programs using this storage implementation. More...
 
virtual const char ** getConfigParameters (const ConfigType &type) const =0
 Get the list of known configuration parameter keys for verification of the configuration by programs using this storage implementation. More...
 
virtual StorageDumpInterfacecreateDump (const std::string &configsource, const DatabaseInterface *database, const std::string &keyprefix) const =0
 Create a dump of a storage. More...
 

Detailed Description

Interface to the create and alter a storage for strus.

Member Enumeration Documentation

Enumeration of different type of configurations Needed for getting the correct description of the configuration.

Enumerator
CmdCreateClient 

Config description for the creation of an instance accessing the repository.

CmdCreate 

Config description for the creation of a repository that does not exist yet.

Constructor & Destructor Documentation

virtual strus::StorageInterface::~StorageInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual StorageAlterMetaDataTableInterface* strus::StorageInterface::createAlterMetaDataTable ( const std::string &  configsource,
const DatabaseInterface database 
) const
pure virtual

Create an interface to alter the meta data table structure.

Parameters
[in]configsourceConfiguration source string describing the storage and the database (not a filename !)
[in]databasekey value store database type used by this storage
Returns
the created reference to be disposed with delete by the caller
virtual StorageClientInterface* strus::StorageInterface::createClient ( const std::string &  configsource,
const DatabaseInterface database,
const StatisticsProcessorInterface statisticsProc = 0 
) const
pure virtual

Creates an client instance of the storage using a defined key value store database.

Parameters
[in]configsourceconfiguration source string describing the storage and the database (not a filename !)
[in]databasekey value store database type used by this storage
[in](optional)statisticsProc defines the format of statistic messages (distribute statistics)
virtual StorageDumpInterface* strus::StorageInterface::createDump ( const std::string &  configsource,
const DatabaseInterface database,
const std::string &  keyprefix 
) const
pure virtual

Create a dump of a storage.

Parameters
[in]configsourceConfiguration source string describing the storage and the database (not a filename !)
[in]databasekey value store database type used by the storage
[in]keyprefixprefix for keys to resrict the dump to
Returns
the object to fetch the dump from
virtual bool strus::StorageInterface::createStorage ( const std::string &  configsource,
const DatabaseInterface database 
) const
pure virtual

Creates a new storage described with configsource using a defined key value store database.

Parameters
[in]configsourceConfiguration source string describing the storage and the database (not a filename !)
[in]databasekey value store database type used by this storage
Returns
true on success, false on error
Remarks
The database referenced by 'database' must have been created and active
virtual const char* strus::StorageInterface::getConfigDescription ( const ConfigType type) const
pure virtual

Gets a configuration description (source string as used by the functions here) createStorage(const std::string&) and createClient(const std::string&) for the usage printed by programs using this storage implementation.

virtual const char** strus::StorageInterface::getConfigParameters ( const ConfigType type) const
pure virtual

Get the list of known configuration parameter keys for verification of the configuration by programs using this storage implementation.


The documentation for this class was generated from the following file: