timeout,
141 unsigned intmax_timeout = 0) = 0;
201 unsigned inttime_to_live = 0,
216 const string&
subkey) = 0;
250 size_tbuf_size) = 0;
263 const string&
subkey) = 0;
328 #define SetBlobVersionAsValid SetBlobVersionAsCurrent 406 unsigned inttime_to_live = 0,
419 const string&
subkey) = 0;
438 const string&
subkey) = 0;
443 const string&
subkey) = 0;
449 virtual void Purge(time_t access_timeout) = 0;
463time_t access_timeout) = 0;
CPluginManager_DllResolver * operator()(void)
Template function to create dll resolver for interface.
Service class for DLLs resolution.
definition of a Culling tree
BLOB cache read/write/maintenance interface.
ETimeStampFlags ETimeStampPolicy
virtual bool IsOpen() const =0
virtual EKeepVersions GetVersionRetention() const =0
Get version retention.
EKeepVersions
If to keep already cached versions of the BLOB when storing another version of it (not necessarily a ...
@ eDropOlder
Delete the earlier (than the one being stored) versions of the BLOB.
@ eDropAll
Delete all versions of the BLOB, even those which are newer than the one being stored.
@ eKeepAll
Do not delete other versions of cache entries.
virtual void SetVersionRetention(EKeepVersions policy)=0
Set version retention policy.
virtual size_t GetSize(const string &key, TBlobVersion version, const string &subkey)=0
Check if BLOB exists, return BLOB size.
virtual IReader * GetReadStream(const string &key, const string &subkey, TBlobVersion *version, EBlobVersionValidity *validity)=0
Request the latest version of a BLOB.
virtual void GetBlobOwner(const string &key, TBlobVersion version, const string &subkey, string *owner)=0
Retrieve BLOB owner.
virtual void Remove(const string &key, TBlobVersion version, const string &subkey)=0
Remove specific cache entry.
virtual TFlags GetFlags()=0
Retrieve the effective combination of flags from the underlying storage.
int TFlags
Bitwise OR of "EFlags" flags.
virtual IWriter * GetWriteStream(const string &key, TBlobVersion version, const string &subkey, unsigned int time_to_live=0, const string &owner=kEmptyStr)=0
Return sequential stream interface to write BLOB data.
TPluginManagerParamTree TCacheParams
Key values to search for a cache with given params.
virtual TTimeStampFlags GetTimeStampPolicy() const =0
Get timestamp policy.
virtual void Purge(const string &key, const string &subkey, time_t access_timeout)=0
Delete BLOBs with access time older than specified.
virtual bool HasBlobs(const string &key, const string &subkey)=0
Check if any BLOB exists (any version)
virtual string GetCacheName(void) const =0
virtual void Purge(time_t access_timeout)=0
Delete all BLOBs older than specified.
virtual void SetTimeStampPolicy(TTimeStampFlags policy, unsigned int timeout, unsigned int max_timeout=0)=0
Set timestamp update policy.
EBlobVersionValidity EBlobValidity
Backward-compatibility typedef.
virtual void SetFlags(TFlags flags)=0
Pass flags to the underlying storage.
virtual time_t GetAccessTime(const string &key, TBlobVersion version, const string &subkey)=0
Return last access time for the specified cache entry.
virtual bool Read(const string &key, TBlobVersion version, const string &subkey, void *buf, size_t buf_size)=0
Fetch the BLOB.
virtual void GetBlobAccess(const string &key, TBlobVersion version, const string &subkey, SBlobAccessDescr *blob_descr)=0
Get BLOB access using BlobAccessDescr.
EBlobVersionValidity
BLOB version existence and validity â from the point of view of the underlying cache implementation.
@ eExpired
Validity of the BLOB version cannot be confirmed.
@ eCurrent
The returned BLOB's version is considered valid.
@ eValid
Synonym for eCurrent.
ETimeStampFlags
ICache keeps timestamps of every cache entry.
@ fTimeStampOnCreate
Cache element is created with a certain timestamp (default)
@ fTimeStampOnRead
Timestamp is updated every on every access (read or write)
@ fExpireLeastFrequentlyUsed
Expire objects older than a certain time frame Example: If object is not accessed within a week it is...
@ fTrackSubKey
Timestamp full key-subkey pair.
@ fPurgeOnStartup
Expired objects should be deleted on cache mount (Open)
@ fCheckExpirationAlways
Expiration timeout is checked on any access to cache element.
@ fNoTimeStamp
Timestamp management disabled.
virtual void Store(const string &key, TBlobVersion version, const string &subkey, const void *data, size_t size, unsigned int time_to_live=0, const string &owner=kEmptyStr)=0
Add or replace BLOB.
EFlags
Flags for the underlying storage.
@ fBestReliability
Usually, it's not a problem if something fails to get cached sometimes.
@ fBestPerformance
The storage to try to get to the best possible overall performance, even if it means sacrificing some...
virtual bool SameCacheParams(const TCacheParams *params) const =0
int TTimeStampFlags
Holds a bitwise OR of "ETimeStampFlags".
virtual int GetTimeout() const =0
Get expiration timeout.
virtual void SetBlobVersionAsCurrent(const string &key, const string &subkey, TBlobVersion version)=0
Set current valid version for a BLOB.
virtual IReader * GetReadStream(const string &key, TBlobVersion version, const string &subkey)=0
Return sequential stream interface to read BLOB data.
A very basic data-read interface.
A very basic data-write interface.
Abstract reader-writer interface classes.
virtual void SetDllNamePrefix(const string &prefix)
Set DLL file name prefix.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_DECLARE_INTERFACE_VERSION(ICache, "xcache", 4, 0, 0)
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
const struct ncbi::grid::netcache::search::fields::SUBKEY subkey
Helper classes and templates to implement plugins.
unsigned maximum_age
Set to a non-zero value to return a version not older than the specified value.
unsigned actual_age
If `maximum_age` is not zero, GetBlobAccess() will set this field to the actual blob version age upon...
unique_ptr< IReader > reader
EBlobVersionValidity current_version_validity
If `return_current_version` is set, the `current_version_validity` field will contain the validity of...
bool return_current_version_supported
If TRUE, the ICache instance supports return_current_version.
TBlobVersion current_version
If `return_current_version` is set, the current version number of the blob is stored in the `current_...
SBlobAccessDescr(char *buf_=0, size_t buf_size_=0)
bool return_current_version
If TRUE, the `version` argument of GetBlobAccess() will be ignored and the `current_version` and `cur...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4