NCBI C++ ToolKit
|
Search Toolkit Book for CNetICacheClient
Client to NetCache server (implements ICache interface) More...
#include <connect/services/neticache_client.hpp>
Public Types | |
enum | EAppRegistry { eAppRegistry } |
Defines how this object must be initialized. More... | |
typedef SNetICacheClientImpl * | TInstance |
typedef grid::netcache::search::CBlobInfo | CBlobInfo |
typedef grid::netcache::search::CExpression | CExpression |
typedef grid::netcache::search::CFields | CFields |
Public Types inherited from ICache | |
enum | EFlags { fBestPerformance = (0 << 0) , fBestReliability = (1 << 0) } |
Flags for the underlying storage. More... | |
enum | ETimeStampFlags { fNoTimeStamp = 0 , fTimeStampOnCreate = (1 << 0) , fTimeStampOnRead = (1 << 1) , fTrackSubKey = (1 << 2) , fExpireLeastFrequentlyUsed = (1 << 3) , fPurgeOnStartup = (1 << 4) , fCheckExpirationAlways = (1 << 5) } |
ICache keeps timestamps of every cache entry. More... | |
enum | EKeepVersions { eKeepAll , eDropOlder , eDropAll } |
If to keep already cached versions of the BLOB when storing another version of it (not necessarily a newer one) More... | |
enum | EBlobVersionValidity { eCurrent , eExpired , eValid = eCurrent } |
BLOB version existence and validity – from the point of view of the underlying cache implementation. More... | |
typedef int | TBlobVersion |
typedef int | TFlags |
Bitwise OR of "EFlags" flags. More... | |
typedef ETimeStampFlags | ETimeStampPolicy |
typedef int | TTimeStampFlags |
Holds a bitwise OR of "ETimeStampFlags". More... | |
typedef EBlobVersionValidity | EBlobValidity |
Backward-compatibility typedef. More... | |
typedef TPluginManagerParamTree | TCacheParams |
Key values to search for a cache with given params. More... | |
Public Member Functions | |
CNetICacheClient (EVoid) | |
CNetICacheClient (SNetICacheClientImpl *impl) | |
CNetICacheClient & | operator= (SNetICacheClientImpl *impl) |
operator SNetICacheClientImpl * () | |
operator const SNetICacheClientImpl * () const | |
SNetICacheClientImpl & | operator-- (int) |
const SNetICacheClientImpl & | operator-- (int) const |
SNetICacheClientImpl * | operator-> () |
const SNetICacheClientImpl * | operator-> () const |
CNetICacheClient (EAppRegistry use_app_reg, const string &conf_section=kEmptyStr) | |
Create an instance of CNetICacheClient and initialize it with parameters read from the application registry. More... | |
CNetICacheClient (CConfig *config=NULL, const string &driver_name=kEmptyStr) | |
CNetICacheClient (const IRegistry ®, const string &conf_section=kEmptyStr) | |
CNetICacheClient (const string &host, unsigned short port, const string &cache_name, const string &client_name) | |
CNetICacheClient (const string &service_name, const string &cache_name, const string &client_name) | |
void | RegisterSession (unsigned pid) |
Send session registration command. More... | |
void | UnRegisterSession (unsigned pid) |
Send session unregistration command. More... | |
virtual TFlags | GetFlags () |
Retrieve the effective combination of flags from the underlying storage. More... | |
virtual void | SetFlags (TFlags flags) |
Pass flags to the underlying storage. More... | |
virtual void | SetTimeStampPolicy (TTimeStampFlags policy, unsigned int timeout, unsigned int max_timeout=0) |
Set timestamp update policy. More... | |
virtual TTimeStampFlags | GetTimeStampPolicy () const |
Get timestamp policy. More... | |
virtual int | GetTimeout () const |
Get expiration timeout. More... | |
virtual bool | IsOpen () const |
virtual void | SetVersionRetention (EKeepVersions policy) |
Set version retention policy. More... | |
virtual EKeepVersions | GetVersionRetention () const |
Get version retention. More... | |
virtual void | Store (const string &key, int version, const string &subkey, const void *data, size_t size, unsigned int time_to_live=0, const string &owner=kEmptyStr) |
Add or replace BLOB. More... | |
virtual size_t | GetSize (const string &key, int version, const string &subkey) |
Check if BLOB exists, return BLOB size. More... | |
size_t | GetBlobSize (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL) |
Returns the size of the BLOB identified by the "key", "version", and "subkey" parameters. More... | |
virtual void | GetBlobOwner (const string &key, int version, const string &subkey, string *owner) |
Retrieve BLOB owner. More... | |
vector< CBlobInfo > | Search (CExpression expression, CFields fields=CFields()) |
Returns information for all blobs matching provided search expression. More... | |
virtual bool | Read (const string &key, int version, const string &subkey, void *buf, size_t buf_size) |
bool | ReadPart (const string &key, int version, const string &subkey, size_t offset, size_t part_size, void *buf, size_t buf_size) |
IReader * | GetReadStream (const string &key, int version, const string &subkey, size_t *blob_size_ptr, const CNamedParameterList *optional=NULL) |
Read a lengthy blob via the IReader interface. More... | |
virtual IReader * | GetReadStream (const string &key, const string &subkey, int *version, EBlobVersionValidity *validity) |
Read a lengthy blob via the IReader interface. More... | |
virtual void | SetBlobVersionAsCurrent (const string &key, const string &subkey, int version) |
Set current valid version for a BLOB. More... | |
IReader * | GetReadStreamPart (const string &key, int version, const string &subkey, size_t offset, size_t part_size, size_t *blob_size_ptr, const CNamedParameterList *optional=NULL) |
Read data from the specified blob. More... | |
virtual IReader * | GetReadStream (const string &key, int version, const string &subkey) |
Read a lengthy blob via the IReader interface. More... | |
virtual void | GetBlobAccess (const string &key, int version, const string &subkey, SBlobAccessDescr *blob_descr) |
Get BLOB access using BlobAccessDescr. More... | |
IEmbeddedStreamWriter * | GetNetCacheWriter (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL) |
Create or update the specified blob. More... | |
virtual IWriter * | GetWriteStream (const string &key, int version, const string &subkey, unsigned int time_to_live=0, const string &owner=kEmptyStr) |
Return sequential stream interface to write BLOB data. More... | |
virtual void | Remove (const string &key, int version, const string &subkey) |
Remove specific cache entry. More... | |
void | RemoveBlob (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL) |
virtual time_t | GetAccessTime (const string &key, int version, const string &subkey) |
Return last access time for the specified cache entry. More... | |
virtual bool | HasBlobs (const string &key, const string &subkey) |
Check if any BLOB exists (any version) More... | |
bool | HasBlob (const string &key, const string &subkey, const CNamedParameterList *optional=NULL) |
virtual void | Purge (time_t access_timeout) |
Delete all BLOBs older than specified. More... | |
virtual void | Purge (const string &key, const string &subkey, time_t access_timeout) |
Delete BLOBs with access time older than specified. More... | |
virtual bool | SameCacheParams (const TCacheParams *params) const |
virtual string | GetCacheName (void) const |
void | SetCommunicationTimeout (const STimeout &to) |
Set communication timeout. More... | |
STimeout | GetCommunicationTimeout () const |
CNetServerMultilineCmdOutput | GetBlobInfo (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL) |
Return a CNetServerMultilineCmdOutput object for reading meta information about the specified blob. More... | |
void | PrintBlobInfo (const string &key, int version, const string &subkey) |
Print meta information about the specified blob. More... | |
CNetService | GetService () |
list< string > | GetSubkeyList (const string &key) |
Public Member Functions inherited from ICache | |
virtual | ~ICache () |
Protected Attributes | |
CNetRef< SNetICacheClientImpl > | m_Impl |
Client to NetCache server (implements ICache interface)
Definition at line 70 of file neticache_client.hpp.