NCBI C++ ToolKit
Classes | Typedefs | Enumerations | Enumerator | Functions | Variables
+ Collaboration diagram for Client API to NCBI NetCache:

Classes

class  CNetCacheAdmin
 
class  CNetCacheAPI
 Client API for NetCache server. More...
 
class  CBlobStorage_NetCache
 CBlobStorage_NetCache – NetCache-based implementation of IBlobStorage. More...
 
class  CNetCacheException
 NetCache internal exception. More...
 
class  CNetCacheBlobTooOldException
 Exception thrown when the requested blob is older than the requested age. More...
 
struct  CNetCacheKey
 Meaningful information encoded in the NetCache key. More...
 
class  CNetICacheClient
 Client to NetCache server (implements ICache interface) More...
 
class  CNetCacheAPIParameters
 
class  CNetCacheReader
 
class  CNetCacheWriter
 

Typedefs

typedef SNetCacheAdminImplCNetCacheAdmin::TInstance
 
typedef SNetCacheAPIImplCNetCacheAPI::TInstance
 
typedef CNamedParameter< unsigned, eNPT_BlobTTLCNetCacheAPI::TBlobTTL
 Named parameter type for blob life span in seconds. More...
 
typedef CNamedParameter< ECachingMode, eNPT_CachingModeCNetCacheAPI::TCachingMode
 Named parameter type for caching mode. More...
 
typedef CNamedParameter< EMirroringMode, eNPT_MirroringModeCNetCacheAPI::TMirroringMode
 Named parameter type for mirroring mode. More...
 
typedef CNamedParameter< ESwitch, eNPT_ServerCheckCNetCacheAPI::TServerCheck
 Named parameter type for whether blob reading methods must check if the primary server that stores the blob is still in service. More...
 
typedef CNamedParameter< bool, eNPT_ServerCheckHintCNetCacheAPI::TServerCheckHint
 Named parameter type for whether to advise the readers to check if the primary server that stores the blob is still in service. More...
 
typedef CNamedParameter< string, eNPT_PasswordCNetCacheAPI::TBlobPassword
 Named parameter type for blob password. More...
 
typedef CNamedParameter< CNetServer::TInstance, eNPT_ServerToUseCNetCacheAPI::TServerToUse
 Named parameter type for specifying the server to use for the operation. More...
 
typedef CNamedParameter< CNetServer *, eNPT_ServerLastUsedPtrCNetCacheAPI::TServerLastUsedPtr
 Named parameter type to supply a pointer to a variable for saving the CNetServer object that was last used. More...
 
typedef CNamedParameter< unsigned, eNPT_MaxBlobAgeCNetCacheAPI::TMaxBlobAge
 Named parameter type to specify that the blob should not be read if its age in seconds is greater than the specified value. More...
 
typedef CNamedParameter< unsigned *, eNPT_ActualBlobAgePtrCNetCacheAPI::TActualBlobAgePtr
 Named parameter type for a pointer to a variable where the actual age of the blob is to be stored. More...
 
typedef CNamedParameter< bool, eNPT_UseCompoundIDCNetCacheAPI::TUseCompoundID
 Named parameter type to define whether to return NetCache keys in CompoundID format. More...
 
typedef CNamedParameter< bool, eNPT_TryAllServersCNetCacheAPI::TTryAllServers
 Named parameter type to define whether to run a request through all NetCache servers in the ICache service in an attempt to find the blob. More...
 
typedef CNamedParameter< string, eNPT_CacheNameCNetCacheAPI::TCacheName
 In ICache mode, override the name of the cache specified in the CNetICacheClient constructor. More...
 
typedef CNetServiceException CNetCacheException::TParent
 
typedef CNetCacheException CNetCacheBlobTooOldException::TParent
 
typedef unsigned CNetCacheKey::TNCKeyFlags
 Binary OR of ENCKeyFlag. More...
 
typedef SNetICacheClientImplCNetICacheClient::TInstance
 
typedef grid::netcache::search::CBlobInfo CNetICacheClient::CBlobInfo
 
typedef grid::netcache::search::CExpression CNetICacheClient::CExpression
 
typedef grid::netcache::search::CFields CNetICacheClient::CFields
 
typedef unsigned CNetCacheAPIParameters::TDefinedParameters
 

Enumerations

enum  CNetCacheAdmin::EShutdownOption { CNetCacheAdmin::eNormalShutdown , CNetCacheAdmin::eDrain }
 Shutdown options. More...
 
enum  CNetCacheAdmin::EReloadConfigOption { CNetCacheAdmin::eCompleteReload , CNetCacheAdmin::eMirrorReload }
 Reload configuration options. More...
 
enum  CNetCacheAdmin::EStatPeriodCompleteness { CNetCacheAdmin::eReturnCurrentPeriod , CNetCacheAdmin::eReturnCompletePeriod }
 Enumeration for use with PrintStat(). More...
 
enum  CNetCacheAPI::ECachingMode { CNetCacheAPI::eCaching_AppDefault , CNetCacheAPI::eCaching_Disable , CNetCacheAPI::eCaching_Enable }
 Allows to define caching behavior on a per-call basis. More...
 
enum  CNetCacheAPI::EMirroringMode { CNetCacheAPI::eMirroringDisabled , CNetCacheAPI::eMirroringEnabled , CNetCacheAPI::eIfKeyMirrored }
 Mirroring modes. More...
 
enum  CNetCacheAPI::EAppRegistry { CNetCacheAPI::eAppRegistry }
 Defines how this object must be initialized. More...
 
enum  CNetCacheAPI::ENamedParameterTag {
  CNetCacheAPI::eNPT_BlobTTL , CNetCacheAPI::eNPT_CachingMode , CNetCacheAPI::eNPT_MirroringMode , CNetCacheAPI::eNPT_ServerCheck ,
  CNetCacheAPI::eNPT_ServerCheckHint , CNetCacheAPI::eNPT_Password , CNetCacheAPI::eNPT_ServerToUse , CNetCacheAPI::eNPT_ServerLastUsedPtr ,
  CNetCacheAPI::eNPT_MaxBlobAge , CNetCacheAPI::eNPT_ActualBlobAgePtr , CNetCacheAPI::eNPT_UseCompoundID , CNetCacheAPI::eNPT_TryAllServers ,
  CNetCacheAPI::eNPT_CacheName
}
 Named parameters that can be used when calling CNetCacheAPI methods that accept CNamedParameterList. More...
 
enum  CNetCacheAPI::EReadResult { CNetCacheAPI::eReadComplete , CNetCacheAPI::eNotFound , CNetCacheAPI::eReadPart }
 Status of GetData() call. More...
 
enum  CNetCacheException::EErrCode {
  CNetCacheException::eAuthenticationError , CNetCacheException::eKeyFormatError , CNetCacheException::eServerError , CNetCacheException::eBlobNotFound ,
  CNetCacheException::eAccessDenied , CNetCacheException::eBlobClipped , CNetCacheException::eUnknownCommand , CNetCacheException::eNotImplemented ,
  CNetCacheException::eInvalidServerResponse
}
 
enum  CNetCacheBlobTooOldException::EErrCode { CNetCacheBlobTooOldException::eBlobTooOld }
 
enum  CNetCacheKey::ENCKeyFlag { CNetCacheKey::fNCKey_SingleServer = 1 << 0 , CNetCacheKey::fNCKey_NoServerCheck = 1 << 1 }
 Blob and blob key features. More...
 
enum  CNetICacheClient::EAppRegistry { CNetICacheClient::eAppRegistry }
 Defines how this object must be initialized. More...
 
enum  CNetCacheAPIParameters::EDefinedParameter {
  CNetCacheAPIParameters::eDP_TTL = 1 << 0 , CNetCacheAPIParameters::eDP_CachingMode = 1 << 1 , CNetCacheAPIParameters::eDP_MirroringMode = 1 << 2 , CNetCacheAPIParameters::eDP_ServerCheck = 1 << 3 ,
  CNetCacheAPIParameters::eDP_ServerCheckHint = 1 << 4 , CNetCacheAPIParameters::eDP_Password = 1 << 5 , CNetCacheAPIParameters::eDP_ServerToUse = 1 << 6 , CNetCacheAPIParameters::eDP_ServerLastUsedPtr = 1 << 7 ,
  CNetCacheAPIParameters::eDP_MaxBlobAge = 1 << 8 , CNetCacheAPIParameters::eDP_ActualBlobAgePtr = 1 << 9 , CNetCacheAPIParameters::eDP_UseCompoundID = 1 << 10 , CNetCacheAPIParameters::eDP_TryAllServers = 1 << 11 ,
  CNetCacheAPIParameters::eDP_CacheName = 1 << 12
}
 
enum  ENetCacheResponseType { eNetCache_Wait , eICache_NoWait }
 

Functions

 CNetCacheAdmin::CNetCacheAdmin (EVoid)
 
 CNetCacheAdmin::CNetCacheAdmin (SNetCacheAdminImpl *impl)
 
CNetCacheAdminCNetCacheAdmin::operator= (SNetCacheAdminImpl *impl)
 
 CNetCacheAdmin::operator SNetCacheAdminImpl * ()
 
 CNetCacheAdmin::operator const SNetCacheAdminImpl * () const
 
SNetCacheAdminImplCNetCacheAdmin::operator-- (int)
 
const SNetCacheAdminImplCNetCacheAdmin::operator-- (int) const
 
SNetCacheAdminImplCNetCacheAdmin::operator-> ()
 
const SNetCacheAdminImplCNetCacheAdmin::operator-> () const
 
 CNetCacheAdmin::CNetCacheAdmin ()
 
void CNetCacheAdmin::ShutdownServer (EShutdownOption shutdown_option=eNormalShutdown)
 Shutdown the server daemon. More...
 
void CNetCacheAdmin::ReloadServerConfig (EReloadConfigOption reload_option=eCompleteReload)
 Reload configuration parameters from the same source. More...
 
void CNetCacheAdmin::Purge (const string &cache_name)
 Remove all blobs from an ICache database. More...
 
void CNetCacheAdmin::PrintConfig (CNcbiOstream &output_stream)
 Print contents of the configuration file. More...
 
void CNetCacheAdmin::PrintStat (CNcbiOstream &output_stream, const string &aggregation_period=kEmptyStr, EStatPeriodCompleteness period_completeness=eReturnCurrentPeriod)
 Print server statistics. More...
 
void CNetCacheAdmin::PrintHealth (CNcbiOstream &output_stream)
 
void CNetCacheAdmin::GetServerVersion (CNcbiOstream &output_stream)
 
 CNetCacheAPI::CNetCacheAPI (EVoid)
 
 CNetCacheAPI::CNetCacheAPI (SNetCacheAPIImpl *impl)
 
CNetCacheAPICNetCacheAPI::operator= (SNetCacheAPIImpl *impl)
 
 CNetCacheAPI::operator SNetCacheAPIImpl * ()
 
 CNetCacheAPI::operator const SNetCacheAPIImpl * () const
 
SNetCacheAPIImplCNetCacheAPI::operator-- (int)
 
const SNetCacheAPIImplCNetCacheAPI::operator-- (int) const
 
SNetCacheAPIImplCNetCacheAPI::operator-> ()
 
const SNetCacheAPIImplCNetCacheAPI::operator-> () const
 
 CNetCacheAPI::CNetCacheAPI ()
 
 CNetCacheAPI::CNetCacheAPI (EAppRegistry use_app_reg, const string &conf_section=kEmptyStr, CNetScheduleAPI::TInstance ns_api=NULL)
 Creates an instance of CNetCacheAPI and initializes it with parameters read from the application registry. More...
 
 CNetCacheAPI::CNetCacheAPI (const IRegistry &reg, const string &conf_section=kEmptyStr, CNetScheduleAPI::TInstance ns_api=NULL)
 Constructs a CNetCacheAPI object and initializes it with parameters read from the specified registry object. More...
 
 CNetCacheAPI::CNetCacheAPI (CConfig *conf, const string &conf_section=kEmptyStr, CNetScheduleAPI::TInstance ns_api=NULL)
 Constructs a CNetCacheAPI object and initializes it with parameters read from the specified configuration object. More...
 
 CNetCacheAPI::CNetCacheAPI (const string &client_name, CNetScheduleAPI::TInstance ns_api=NULL)
 
 CNetCacheAPI::CNetCacheAPI (const string &service_name, const string &client_name, CNetScheduleAPI::TInstance ns_api=NULL)
 Construct client, working with the specified service. More...
 
void CNetCacheAPI::SetDefaultParameters (const CNamedParameterList *parameters)
 Override defaults used by this object. More...
 
string CNetCacheAPI::PutData (const void *buf, size_t size, const CNamedParameterList *optional=NULL)
 Put BLOB to server. More...
 
IEmbeddedStreamWriterCNetCacheAPI::PutData (string *key, const CNamedParameterList *optional=NULL)
 Put BLOB to server. More...
 
string CNetCacheAPI::PutData (const string &key, const void *buf, size_t size, const CNamedParameterList *optional=NULL)
 Update an existing BLOB. More...
 
CNcbiOstreamCNetCacheAPI::CreateOStream (string &key, const CNamedParameterList *optional=NULL)
 Create a stream object for sending data to a blob. More...
 
bool CNetCacheAPI::HasBlob (const string &blob_id, const CNamedParameterList *optional=NULL)
 Check if the BLOB identified by the key "key" exists. More...
 
size_t CNetCacheAPI::GetBlobSize (const string &blob_id, const CNamedParameterList *optional=NULL)
 Returns the size of the BLOB identified by the "key" parameter. More...
 
IReaderCNetCacheAPI::GetReader (const string &key, size_t *blob_size=NULL, const CNamedParameterList *optional=NULL)
 Get a pointer to the IReader interface to read blob contents. More...
 
IReaderCNetCacheAPI::GetPartReader (const string &key, size_t offset, size_t part_size, size_t *blob_size=NULL, const CNamedParameterList *optional=NULL)
 Get a pointer to the IReader interface to read a portion of the blob contents. More...
 
void CNetCacheAPI::ReadData (const string &key, string &buffer, const CNamedParameterList *optional=NULL)
 Read the blob pointed to by "key" and store its contents in "buffer". More...
 
void CNetCacheAPI::ReadPart (const string &key, size_t offset, size_t part_size, string &buffer, const CNamedParameterList *optional=NULL)
 Read a part of the blob pointed to by "key" and store its contents in "buffer". More...
 
IReaderCNetCacheAPI::GetData (const string &key, size_t *blob_size=NULL, const CNamedParameterList *optional=NULL)
 Retrieve BLOB from server by key. More...
 
EReadResult CNetCacheAPI::GetData (const string &key, void *buf, size_t buf_size, size_t *n_read=0, size_t *blob_size=0, const CNamedParameterList *optional=NULL)
 Retrieve BLOB from server by key. More...
 
EReadResult CNetCacheAPI::GetData (const string &key, CSimpleBuffer &buffer, const CNamedParameterList *optional=NULL)
 Retrieve BLOB from server by key This method retrieves BLOB size, allocates memory and gets all the data from the server. More...
 
CNcbiIstreamCNetCacheAPI::GetIStream (const string &key, size_t *blob_size=NULL, const CNamedParameterList *optional=NULL)
 Create an istream object for reading blob data. More...
 
void CNetCacheAPI::Remove (const string &blob_id, const CNamedParameterList *optional=NULL)
 Remove BLOB by key. More...
 
CNetServerMultilineCmdOutput CNetCacheAPI::GetBlobInfo (const string &blob_id, const CNamedParameterList *optional=NULL)
 Return a CNetServerMultilineCmdOutput object for reading meta information about the specified blob. More...
 
void CNetCacheAPI::PrintBlobInfo (const string &blob_key, const CNamedParameterList *optional=NULL)
 Print meta information about the specified blob. More...
 
void CNetCacheAPI::ProlongBlobLifetime (const string &blob_key, unsigned ttl, const CNamedParameterList *optional=NULL)
 
CNetCacheAdmin CNetCacheAPI::GetAdmin ()
 
CNetService CNetCacheAPI::GetService ()
 
void CNetCacheAPI::SetCommunicationTimeout (const STimeout &to)
 
CCompoundIDPool CNetCacheAPI::GetCompoundIDPool ()
 
void CNetCacheAPI::SetCompoundIDPool (CCompoundIDPool::TInstance compound_id_pool)
 
 NCBI_DECLARE_INTERFACE_VERSION (SNetCacheAPIImpl, "xnetcacheapi", 1, 1, 0)
 
void NCBI_EntryPoint_xnetcacheapi (CPluginManager< SNetCacheAPIImpl >::TDriverInfoList &info_list, CPluginManager< SNetCacheAPIImpl >::EEntryPointRequest method)
 
 CBlobStorage_NetCache::CBlobStorage_NetCache ()
 
 CBlobStorage_NetCache::CBlobStorage_NetCache (CNetCacheAPI::TInstance nc_client)
 Create Blob Storage. More...
 
virtual CBlobStorage_NetCache::~CBlobStorage_NetCache ()
 
virtual bool CBlobStorage_NetCache::IsKeyValid (const string &str)
 Check if a given string is a valid key. More...
 
virtual string CBlobStorage_NetCache::GetBlobAsString (const string &data_id)
 Get a blob content as a string. More...
 
virtual CNcbiIstreamCBlobStorage_NetCache::GetIStream (const string &data_id, size_t *blob_size_ptr=0, ELockMode lock_mode=eLockWait)
 Get an input stream to a blob. More...
 
virtual CNcbiOstreamCBlobStorage_NetCache::CreateOStream (string &data_id, ELockMode lock_mode=eLockNoWait)
 Get an output stream to a blob. More...
 
virtual string CBlobStorage_NetCache::CreateEmptyBlob ()
 Create an new blob. More...
 
virtual void CBlobStorage_NetCache::DeleteBlob (const string &data_id)
 Delete a blob. More...
 
virtual void CBlobStorage_NetCache::Reset ()
 Close all streams and connections. More...
 
CNetCacheAPI CBlobStorage_NetCache::GetNetCacheAPI () const
 
 CBlobStorage_NetCache::CBlobStorage_NetCache (const CBlobStorage_NetCache &)
 
CBlobStorage_NetCacheCBlobStorage_NetCache::operator= (CBlobStorage_NetCache &)
 
virtual const char * CNetCacheException::GetErrCodeString () const override
 Get error code interpreted as text. More...
 
 CNetCacheException::NCBI_EXCEPTION_DEFAULT (CNetCacheException, CNetServiceException)
 
virtual const char * CNetCacheBlobTooOldException::GetErrCodeString () const override
 Get error code interpreted as text. More...
 
unsigned CNetCacheBlobTooOldException::GetAge () const
 
int CNetCacheBlobTooOldException::GetVersion () const
 
 CNetCacheBlobTooOldException::NCBI_EXCEPTION_DEFAULT (CNetCacheBlobTooOldException, CNetCacheException)
 
 CNetCacheKey::CNetCacheKey (const string &key_str, CCompoundIDPool::TInstance id_pool=NULL)
 Create the key out of string. More...
 
 CNetCacheKey::CNetCacheKey ()
 Create an empty object for later use with ParseBlobKey() or Assign(). More...
 
void CNetCacheKey::Assign (const string &key_str, CCompoundIDPool::TInstance id_pool=NULL)
 Parse the specified blob ID and initializes this object. More...
 
static bool CNetCacheKey::ParseBlobKey (const char *key_str, size_t key_len, CNetCacheKey *key_obj, CCompoundIDPool::TInstance id_pool=NULL)
 Parse blob key string into a CNetCacheKey structure. More...
 
bool CNetCacheKey::HasExtensions () const
 
string CNetCacheKey::StripKeyExtensions () const
 If the blob key has been parsed successfully, this method returns a trimmed "base" version of the key with "0MetA0" extensions removed. More...
 
static void CNetCacheKey::AddExtensions (string &blob_id, const string &service_name, TNCKeyFlags flags, unsigned ver=1)
 Unconditionally append a service name to the specified string. More...
 
TNCKeyFlags CNetCacheKey::GetFlags () const
 
bool CNetCacheKey::GetFlag (ENCKeyFlag flag) const
 
void CNetCacheKey::SetFlag (ENCKeyFlag flag)
 
void CNetCacheKey::ClearFlag (ENCKeyFlag flag)
 
static Uint4 CNetCacheKey::CalculateChecksum (const string &host, unsigned short port)
 Calculate and return the CRC32 checksum generated from the string "host:port". More...
 
static void CNetCacheKey::GenerateBlobKey (string *key, unsigned int id, const string &host, unsigned short port, unsigned int ver, unsigned int rnd_num, time_t creation_time=0)
 Generate blob key string. More...
 
static string CNetCacheKey::KeyToCompoundID (const string &key_str, CCompoundIDPool id_pool)
 
static unsigned int CNetCacheKey::GetBlobId (const string &key_str)
 Parse blob key, extract id. More...
 
static bool CNetCacheKey::IsValidKey (const char *key_str, size_t key_len, CCompoundIDPool::TInstance id_pool=NULL)
 
static bool CNetCacheKey::IsValidKey (const string &key, CCompoundIDPool::TInstance id_pool=NULL)
 
const stringCNetCacheKey::GetKey () const
 
unsigned CNetCacheKey::GetId () const
 
const stringCNetCacheKey::GetHost () const
 
unsigned short CNetCacheKey::GetPort () const
 
unsigned CNetCacheKey::GetHostPortCRC32 () const
 
unsigned CNetCacheKey::GetVersion () const
 
time_t CNetCacheKey::GetCreationTime () const
 
Uint4 CNetCacheKey::GetRandomPart () const
 
const stringCNetCacheKey::GetServiceName () const
 
 CNetICacheClient::CNetICacheClient (EVoid)
 
 CNetICacheClient::CNetICacheClient (SNetICacheClientImpl *impl)
 
CNetICacheClientCNetICacheClient::operator= (SNetICacheClientImpl *impl)
 
 CNetICacheClient::operator SNetICacheClientImpl * ()
 
 CNetICacheClient::operator const SNetICacheClientImpl * () const
 
SNetICacheClientImplCNetICacheClient::operator-- (int)
 
const SNetICacheClientImplCNetICacheClient::operator-- (int) const
 
SNetICacheClientImplCNetICacheClient::operator-> ()
 
const SNetICacheClientImplCNetICacheClient::operator-> () const
 
 CNetICacheClient::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::CNetICacheClient (CConfig *config=NULL, const string &driver_name=kEmptyStr)
 
 CNetICacheClient::CNetICacheClient (const IRegistry &reg, const string &conf_section=kEmptyStr)
 
 CNetICacheClient::CNetICacheClient (const string &host, unsigned short port, const string &cache_name, const string &client_name)
 
 CNetICacheClient::CNetICacheClient (const string &service_name, const string &cache_name, const string &client_name)
 
void CNetICacheClient::RegisterSession (unsigned pid)
 Send session registration command. More...
 
void CNetICacheClient::UnRegisterSession (unsigned pid)
 Send session unregistration command. More...
 
virtual TFlags CNetICacheClient::GetFlags ()
 Retrieve the effective combination of flags from the underlying storage. More...
 
virtual void CNetICacheClient::SetFlags (TFlags flags)
 Pass flags to the underlying storage. More...
 
virtual void CNetICacheClient::SetTimeStampPolicy (TTimeStampFlags policy, unsigned int timeout, unsigned int max_timeout=0)
 Set timestamp update policy. More...
 
virtual TTimeStampFlags CNetICacheClient::GetTimeStampPolicy () const
 Get timestamp policy. More...
 
virtual int CNetICacheClient::GetTimeout () const
 Get expiration timeout. More...
 
virtual bool CNetICacheClient::IsOpen () const
 
virtual void CNetICacheClient::SetVersionRetention (EKeepVersions policy)
 Set version retention policy. More...
 
virtual EKeepVersions CNetICacheClient::GetVersionRetention () const
 Get version retention. More...
 
virtual void CNetICacheClient::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 CNetICacheClient::GetSize (const string &key, int version, const string &subkey)
 Check if BLOB exists, return BLOB size. More...
 
size_t CNetICacheClient::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 CNetICacheClient::GetBlobOwner (const string &key, int version, const string &subkey, string *owner)
 Retrieve BLOB owner. More...
 
vector< CBlobInfoCNetICacheClient::Search (CExpression expression, CFields fields=CFields())
 Returns information for all blobs matching provided search expression. More...
 
virtual bool CNetICacheClient::Read (const string &key, int version, const string &subkey, void *buf, size_t buf_size)
 
bool CNetICacheClient::ReadPart (const string &key, int version, const string &subkey, size_t offset, size_t part_size, void *buf, size_t buf_size)
 
IReaderCNetICacheClient::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 IReaderCNetICacheClient::GetReadStream (const string &key, const string &subkey, int *version, EBlobVersionValidity *validity)
 Read a lengthy blob via the IReader interface. More...
 
virtual void CNetICacheClient::SetBlobVersionAsCurrent (const string &key, const string &subkey, int version)
 Set current valid version for a BLOB. More...
 
IReaderCNetICacheClient::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 IReaderCNetICacheClient::GetReadStream (const string &key, int version, const string &subkey)
 Read a lengthy blob via the IReader interface. More...
 
virtual void CNetICacheClient::GetBlobAccess (const string &key, int version, const string &subkey, SBlobAccessDescr *blob_descr)
 Get BLOB access using BlobAccessDescr. More...
 
IEmbeddedStreamWriterCNetICacheClient::GetNetCacheWriter (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL)
 Create or update the specified blob. More...
 
virtual IWriterCNetICacheClient::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 CNetICacheClient::Remove (const string &key, int version, const string &subkey)
 Remove specific cache entry. More...
 
void CNetICacheClient::RemoveBlob (const string &key, int version, const string &subkey, const CNamedParameterList *optional=NULL)
 
virtual time_t CNetICacheClient::GetAccessTime (const string &key, int version, const string &subkey)
 Return last access time for the specified cache entry. More...
 
virtual bool CNetICacheClient::HasBlobs (const string &key, const string &subkey)
 Check if any BLOB exists (any version) More...
 
bool CNetICacheClient::HasBlob (const string &key, const string &subkey, const CNamedParameterList *optional=NULL)
 
virtual void CNetICacheClient::Purge (time_t access_timeout)
 Delete all BLOBs older than specified. More...
 
virtual void CNetICacheClient::Purge (const string &key, const string &subkey, time_t access_timeout)
 Delete BLOBs with access time older than specified. More...
 
virtual bool CNetICacheClient::SameCacheParams (const TCacheParams *params) const
 
virtual string CNetICacheClient::GetCacheName (void) const
 
void CNetICacheClient::SetCommunicationTimeout (const STimeout &to)
 Set communication timeout. More...
 
STimeout CNetICacheClient::GetCommunicationTimeout () const
 
CNetServerMultilineCmdOutput CNetICacheClient::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 CNetICacheClient::PrintBlobInfo (const string &key, int version, const string &subkey)
 Print meta information about the specified blob. More...
 
CNetService CNetICacheClient::GetService ()
 
list< stringCNetICacheClient::GetSubkeyList (const string &key)
 
void NCBI_EntryPoint_xcache_netcache (CPluginManager< ICache >::TDriverInfoList &info_list, CPluginManager< ICache >::EEntryPointRequest method)
 
void Cache_RegisterDriver_NetCache (void)
 
 CNetCacheAPIParameters::CNetCacheAPIParameters (EVoid)
 
 CNetCacheAPIParameters::CNetCacheAPIParameters (const CNetCacheAPIParameters *defaults)
 
void CNetCacheAPIParameters::LoadNamedParameters (const CNamedParameterList *optional)
 
void CNetCacheAPIParameters::SetTTL (unsigned blob_ttl)
 
void CNetCacheAPIParameters::SetCachingMode (CNetCacheAPI::ECachingMode caching_mode)
 
void CNetCacheAPIParameters::SetMirroringMode (CNetCacheAPI::EMirroringMode mirroring_mode)
 
void CNetCacheAPIParameters::SetMirroringMode (const string &mirroring_mode)
 
void CNetCacheAPIParameters::SetServerCheck (ESwitch server_check)
 
void CNetCacheAPIParameters::SetServerCheck (const string &server_check)
 
void CNetCacheAPIParameters::SetServerCheckHint (bool server_check_hint)
 
void CNetCacheAPIParameters::SetServerCheckHint (const string &server_check_hint)
 
void CNetCacheAPIParameters::SetPassword (const string &password)
 
void CNetCacheAPIParameters::SetServerToUse (CNetServer::TInstance server_to_use)
 
void CNetCacheAPIParameters::SetServerLastUsedPtr (CNetServer *server_last_used_ptr)
 
void CNetCacheAPIParameters::SetMaxBlobAge (unsigned max_age)
 
void CNetCacheAPIParameters::SetActualBlobAgePtr (unsigned *actual_age_ptr)
 
void CNetCacheAPIParameters::SetUseCompoundID (bool use_compound_id)
 
void CNetCacheAPIParameters::SetTryAllServers (bool try_all_servers)
 
void CNetCacheAPIParameters::SetCacheName (const string &cache_name)
 
unsigned CNetCacheAPIParameters::GetTTL () const
 
CNetCacheAPI::ECachingMode CNetCacheAPIParameters::GetCachingMode () const
 
CNetCacheAPI::EMirroringMode CNetCacheAPIParameters::GetMirroringMode () const
 
bool CNetCacheAPIParameters::GetServerCheck (ESwitch *server_check) const
 
bool CNetCacheAPIParameters::GetServerCheckHint (bool *server_check_hint) const
 
std::string CNetCacheAPIParameters::GetPassword () const
 
CNetServer CNetCacheAPIParameters::GetServerToUse () const
 
CNetServerCNetCacheAPIParameters::GetServerLastUsedPtr () const
 
unsigned CNetCacheAPIParameters::GetMaxBlobAge () const
 
unsigned * CNetCacheAPIParameters::GetActualBlobAgePtr () const
 
bool CNetCacheAPIParameters::GetUseCompoundID () const
 
bool CNetCacheAPIParameters::GetTryAllServers () const
 
string CNetCacheAPIParameters::GetCacheName () const
 
static bool CNetCacheAPIParameters::StringToBool (const string &bool_str, bool default_value=false)
 
size_t CheckBlobSize (Uint8 blob_size)
 
 CNetCacheReader::CNetCacheReader (SNetCacheAPIImpl *impl, const string &blob_id, CNetServer::SExecResult &exec_result, size_t *blob_size_ptr, const CNetCacheAPIParameters *parameters)
 
virtual CNetCacheReader::~CNetCacheReader ()
 
virtual ERW_Result CNetCacheReader::Read (void *buf, size_t count, size_t *bytes_read_ptr=0)
 Read as many as "count" bytes into a buffer pointed to by the "buf" argument. More...
 
virtual ERW_Result CNetCacheReader::PendingCount (size_t *count)
 Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking. More...
 
virtual void CNetCacheReader::Close ()
 
const stringCNetCacheReader::GetBlobID () const
 
Uint8 CNetCacheReader::GetBlobSize () const
 
bool CNetCacheReader::Eof () const
 
void CNetCacheReader::SocketRead (void *buf, size_t count, size_t *bytes_read)
 
 CNetCacheWriter::CNetCacheWriter (SNetCacheAPIImpl *impl, string *blob_id, const string &key, ENetCacheResponseType response_type, const CNetCacheAPIParameters *parameters)
 
virtual CNetCacheWriter::~CNetCacheWriter ()
 
virtual ERW_Result CNetCacheWriter::Write (const void *buf, size_t count, size_t *bytes_written=0)
 Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device. More...
 
virtual ERW_Result CNetCacheWriter::Flush (void)
 Flush pending data (if any) down to the output device. More...
 
virtual void CNetCacheWriter::Close ()
 
virtual void CNetCacheWriter::Abort ()
 
void CNetCacheWriter::WriteBufferAndClose (const char *buf_ptr, size_t buf_size)
 
ENetCacheResponseType CNetCacheWriter::GetResponseType () const
 
const stringCNetCacheWriter::GetBlobID () const
 
const stringCNetCacheWriter::GetKey () const
 
void CNetCacheWriter::SetBlobID (const string &blob_id)
 
bool CNetCacheWriter::IsConnectionOpen ()
 
void CNetCacheWriter::ResetWriters ()
 
void CNetCacheWriter::AbortConnection ()
 
EIO_Status CNetCacheWriter::TransmitImpl (const char *buf, size_t count)
 
void CNetCacheWriter::Transmit (const void *buf, size_t count, size_t *bytes_written)
 
void CNetCacheWriter::EstablishConnection ()
 
void CNetCacheWriter::UploadCacheFile ()
 

Variables

CNetRef< SNetCacheAdminImplCNetCacheAdmin::m_Impl
 
CNetRef< SNetCacheAPIImplCNetCacheAPI::m_Impl
 
const char *const kNetCacheAPIDriverName
 
CNetCacheAPI CBlobStorage_NetCache::m_NCClient
 
unique_ptr< CNcbiIstreamCBlobStorage_NetCache::m_IStream
 
unique_ptr< CNcbiOstreamCBlobStorage_NetCache::m_OStream
 
string CNetCacheKey::m_Key
 
string CNetCacheKey::m_PrimaryKey
 
unsigned int CNetCacheKey::m_Id
 BLOB id. More...
 
string CNetCacheKey::m_Host
 server name More...
 
unsigned short CNetCacheKey::m_Port
 TCP/IP port number. More...
 
unsigned CNetCacheKey::m_HostPortCRC32
 CRC32 checksum of the host:port combination. More...
 
unsigned CNetCacheKey::m_Version
 Key version. More...
 
time_t CNetCacheKey::m_CreationTime
 
Uint4 CNetCacheKey::m_Random
 
string CNetCacheKey::m_ServiceName
 
TNCKeyFlags CNetCacheKey::m_Flags
 
CNetRef< SNetICacheClientImplCNetICacheClient::m_Impl
 
const char *const kNetICacheDriverName
 
TDefinedParameters CNetCacheAPIParameters::m_DefinedParameters
 
const CNetCacheAPIParametersCNetCacheAPIParameters::m_Defaults
 
unsigned CNetCacheAPIParameters::m_TTL
 
CNetCacheAPI::ECachingMode CNetCacheAPIParameters::m_CachingMode
 
CNetCacheAPI::EMirroringMode CNetCacheAPIParameters::m_MirroringMode
 
ESwitch CNetCacheAPIParameters::m_ServerCheck
 
bool CNetCacheAPIParameters::m_ServerCheckHint
 
std::string CNetCacheAPIParameters::m_Password
 
CNetServer CNetCacheAPIParameters::m_ServerToUse
 
CNetServerCNetCacheAPIParameters::m_ServerLastUsedPtr
 
unsigned CNetCacheAPIParameters::m_MaxBlobAge
 
unsigned * CNetCacheAPIParameters::m_ActualBlobAgePtr
 
bool CNetCacheAPIParameters::m_UseCompoundID
 
bool CNetCacheAPIParameters::m_TryAllServers
 
string CNetCacheAPIParameters::m_CacheName
 
string CNetCacheReader::m_BlobID
 
CNetServerConnection CNetCacheReader::m_Connection
 
Uint8 CNetCacheReader::m_BlobSize
 
Uint8 CNetCacheReader::m_BlobBytesToRead
 
CFileIO CNetCacheReader::m_CacheFile
 
bool CNetCacheReader::m_CachingEnabled
 
CNetServerConnection CNetCacheWriter::m_Connection
 
unique_ptr< CSocketReaderWriterCNetCacheWriter::m_SocketReaderWriter
 
unique_ptr< CTransmissionWriterCNetCacheWriter::m_TransmissionWriter
 
ENetCacheResponseType CNetCacheWriter::m_ResponseType
 
CNetCacheAPI CNetCacheWriter::m_NetCacheAPI
 
string CNetCacheWriter::m_BlobID
 
string CNetCacheWriter::m_Key
 
const CNetCacheAPIParametersCNetCacheWriter::m_Parameters
 
CFileIO CNetCacheWriter::m_CacheFile
 
bool CNetCacheWriter::m_CachingEnabled
 

Detailed Description

Typedef Documentation

◆ CBlobInfo

typedef grid::netcache::search::CBlobInfo CNetICacheClient::CBlobInfo

Definition at line 150 of file neticache_client.hpp.

◆ CExpression

typedef grid::netcache::search::CExpression CNetICacheClient::CExpression

Definition at line 151 of file neticache_client.hpp.

◆ CFields

typedef grid::netcache::search::CFields CNetICacheClient::CFields

Definition at line 152 of file neticache_client.hpp.

◆ TActualBlobAgePtr

Named parameter type for a pointer to a variable where the actual age of the blob is to be stored.

This type of parameter can be defined through the nc_actual_age macro substitution, for example: nc_actual_age = &blob_age

See also
nc_actual_age

Definition at line 567 of file netcache_api.hpp.

◆ TBlobPassword

Named parameter type for blob password.

A blob created with a password cannot be read without specifying the same password. This type of parameter can be defined through the nc_blob_password macro substitution, for example: nc_blob_password = "secret"

See also
nc_blob_password

Definition at line 531 of file netcache_api.hpp.

◆ TBlobTTL

Named parameter type for blob life span in seconds.

If zero or greater than the server-side value, then the server-side TTL is used. This type of parameter can be defined through the nc_blob_ttl macro substitution, for example: nc_blob_ttl = 600

See also
nc_blob_ttl

Definition at line 491 of file netcache_api.hpp.

◆ TCacheName

In ICache mode, override the name of the cache specified in the CNetICacheClient constructor.

This type of parameter can be defined through the nc_cache_name macro substitution, for example: nc_cache_name = "appdata"

See also
nc_cache_name

Definition at line 591 of file netcache_api.hpp.

◆ TCachingMode

Named parameter type for caching mode.

This type of parameter can be defined through the nc_caching_mode macro substitution, for example: nc_caching_mode = CNetCacheAPI::eCaching_Disable

See also
nc_caching_mode, ECachingMode

Definition at line 498 of file netcache_api.hpp.

◆ TDefinedParameters

Definition at line 68 of file netcache_params.hpp.

◆ TInstance [1/3]

Definition at line 56 of file netcache_admin.hpp.

◆ TInstance [2/3]

Definition at line 144 of file netcache_api.hpp.

◆ TInstance [3/3]

Definition at line 72 of file neticache_client.hpp.

◆ TMaxBlobAge

Named parameter type to specify that the blob should not be read if its age in seconds is greater than the specified value.

This type of parameter can be defined through the nc_max_age macro substitution, for example: nc_max_age = 3600

See also
nc_max_age

Definition at line 559 of file netcache_api.hpp.

◆ TMirroringMode

Named parameter type for mirroring mode.

This type of parameter can be defined through the nc_mirroring_mode macro substitution, for example: nc_mirroring_mode = CNetCacheAPI::eMirroringEnabled

See also
nc_mirroring_mode, EMirroringMode

Definition at line 505 of file netcache_api.hpp.

◆ TNCKeyFlags

typedef unsigned CNetCacheKey::TNCKeyFlags

Binary OR of ENCKeyFlag.

Definition at line 70 of file netcache_key.hpp.

◆ TParent [1/2]

Definition at line 56 of file netcache_api_expt.hpp.

◆ TParent [2/2]

Definition at line 103 of file netcache_api_expt.hpp.

◆ TServerCheck

Named parameter type for whether blob reading methods must check if the primary server that stores the blob is still in service.

This type of parameter can be defined through the nc_server_check macro substitution, for example: nc_server_check = eOn

See also
nc_server_check

Definition at line 514 of file netcache_api.hpp.

◆ TServerCheckHint

Named parameter type for whether to advise the readers to check if the primary server that stores the blob is still in service.

This type parameter only has effect during blob creation and can be defined through the nc_server_check_hint macro substitution, for example: nc_server_check_hint = true

See also
nc_server_check_hint

Definition at line 523 of file netcache_api.hpp.

◆ TServerLastUsedPtr

Named parameter type to supply a pointer to a variable for saving the CNetServer object that was last used.

This parameter works only with (some of) CNetICacheClient methods. This type of parameter can be defined through the nc_server_last_used macro substitution, for example: nc_server_last_used = &netserver_object

See also
nc_server_last_used

Definition at line 551 of file netcache_api.hpp.

◆ TServerToUse

Named parameter type for specifying the server to use for the operation.

Overrides whatever is defined in the constructor or the configuration file. This type of parameter can be defined through the nc_server_to_use macro substitution, for example: nc_server_to_use = netserver_object

See also
nc_server_to_use

Definition at line 541 of file netcache_api.hpp.

◆ TTryAllServers

Named parameter type to define whether to run a request through all NetCache servers in the ICache service in an attempt to find the blob.

This type of parameter can be defined through the nc_try_all_servers macro substitution, for example: nc_try_all_servers = true

See also
nc_try_all_servers

Definition at line 583 of file netcache_api.hpp.

◆ TUseCompoundID

Named parameter type to define whether to return NetCache keys in CompoundID format.

This type of parameter can be defined through the nc_use_compound_id macro substitution, for example: nc_use_compound_id = true

See also
nc_use_compound_id

Definition at line 575 of file netcache_api.hpp.

Enumeration Type Documentation

◆ EAppRegistry [1/2]

Defines how this object must be initialized.

Enumerator
eAppRegistry 

Definition at line 162 of file netcache_api.hpp.

◆ EAppRegistry [2/2]

Defines how this object must be initialized.

Enumerator
eAppRegistry 

Definition at line 75 of file neticache_client.hpp.

◆ ECachingMode

Allows to define caching behavior on a per-call basis.

Enumerator
eCaching_AppDefault 
eCaching_Disable 
eCaching_Enable 

Definition at line 147 of file netcache_api.hpp.

◆ EDefinedParameter

Enumerator
eDP_TTL 
eDP_CachingMode 
eDP_MirroringMode 
eDP_ServerCheck 
eDP_ServerCheckHint 
eDP_Password 
eDP_ServerToUse 
eDP_ServerLastUsedPtr 
eDP_MaxBlobAge 
eDP_ActualBlobAgePtr 
eDP_UseCompoundID 
eDP_TryAllServers 
eDP_CacheName 

Definition at line 53 of file netcache_params.hpp.

◆ EErrCode [1/2]

Enumerator
eAuthenticationError 

If client is not allowed to run this operation.

BLOB key corruption or version mismatch

eKeyFormatError 

Server side error.

eServerError 

Blob is not found.

eBlobNotFound 

Access denied.

eAccessDenied 

Blob could not be read completely.

eBlobClipped 

The requested command is (yet) unknown.

eUnknownCommand 

The requested command is not implemented.

eNotImplemented 

Invalid response from the server.

eInvalidServerResponse 

Definition at line 57 of file netcache_api_expt.hpp.

◆ EErrCode [2/2]

Enumerator
eBlobTooOld 

The blob is older than the requested age.

Definition at line 104 of file netcache_api_expt.hpp.

◆ EMirroringMode

Mirroring modes.

eIfKeyMirrored unconditionally enables mirroring for blobs that were created in mirroring mode.

Enumerator
eMirroringDisabled 
eMirroringEnabled 
eIfKeyMirrored 

Definition at line 155 of file netcache_api.hpp.

◆ ENamedParameterTag

Named parameters that can be used when calling CNetCacheAPI methods that accept CNamedParameterList.

Enumerator
eNPT_BlobTTL 
eNPT_CachingMode 
eNPT_MirroringMode 
eNPT_ServerCheck 
eNPT_ServerCheckHint 
eNPT_Password 
eNPT_ServerToUse 
eNPT_ServerLastUsedPtr 
eNPT_MaxBlobAge 
eNPT_ActualBlobAgePtr 
eNPT_UseCompoundID 
eNPT_TryAllServers 
eNPT_CacheName 

Definition at line 212 of file netcache_api.hpp.

◆ ENCKeyFlag

Blob and blob key features.

Enumerator
fNCKey_SingleServer 

Mark this blob as not mirrored.

fNCKey_NoServerCheck 

Disable the check for whether the server IP is still in service.

Definition at line 65 of file netcache_key.hpp.

◆ ENetCacheResponseType

Enumerator
eNetCache_Wait 
eICache_NoWait 

Definition at line 110 of file netcache_rw.hpp.

◆ EReadResult

Status of GetData() call.

See also
GetData
Enumerator
eReadComplete 

The whole BLOB has been read.

eNotFound 

BLOB not found or error.

eReadPart 

Read part of the BLOB (buffer capacity)

Definition at line 422 of file netcache_api.hpp.

◆ EReloadConfigOption

Reload configuration options.

Enumerator
eCompleteReload 

Complete reload is requested.

eMirrorReload 

Parameters related to mirroring will only be reloaded.

Definition at line 72 of file netcache_admin.hpp.

◆ EShutdownOption

Shutdown options.

Enumerator
eNormalShutdown 

Normal shutdown is requested.

eDrain 

Wait for all blobs to expire.

Definition at line 60 of file netcache_admin.hpp.

◆ EStatPeriodCompleteness

Enumeration for use with PrintStat().

Indicates whether to return the current (incomplete) aggregation period or the previous one (which is complete).

Enumerator
eReturnCurrentPeriod 
eReturnCompletePeriod 

Definition at line 89 of file netcache_admin.hpp.

Function Documentation

◆ Abort()

void CNetCacheWriter::Abort ( void  )
virtual

◆ AbortConnection()

void CNetCacheWriter::AbortConnection ( )
private

◆ AddExtensions()

void CNetCacheKey::AddExtensions ( string blob_id,
const string service_name,
CNetCacheKey::TNCKeyFlags  flags,
unsigned  ver = 1 
)
static

◆ Assign()

void CNetCacheKey::Assign ( const string key_str,
CCompoundIDPool::TInstance  id_pool = NULL 
)

Parse the specified blob ID and initializes this object.

Exceptions
CNetCacheExceptionif key format is not recognized.

Definition at line 312 of file netcache_key.cpp.

References CNetCacheKey::m_Key, NCBI_THROW_FMT, CNetCacheKey::ParseBlobKey(), and NStr::PrintableString().

Referenced by CNetCacheKey::CNetCacheKey().

◆ Cache_RegisterDriver_NetCache()

void Cache_RegisterDriver_NetCache ( void  )

Definition at line 1056 of file neticache_client.cpp.

References NCBI_EntryPoint_xcache_netcache().

◆ CalculateChecksum()

Uint4 CNetCacheKey::CalculateChecksum ( const string host,
unsigned short  port 
)
static

Calculate and return the CRC32 checksum generated from the string "host:port".

Definition at line 324 of file netcache_key.cpp.

References crc32, CChecksum::eCRC32, and NStr::NumericToString().

Referenced by CNCDistributionConf::CreateHostAlias(), SNetCacheAPIImpl::ExecMirrorAware(), and CNetCacheKey::GenerateBlobKey().

◆ CBlobStorage_NetCache() [1/3]

CBlobStorage_NetCache::CBlobStorage_NetCache ( )

Definition at line 1046 of file netcache_api.cpp.

References _ASSERT.

◆ CBlobStorage_NetCache() [2/3]

CBlobStorage_NetCache::CBlobStorage_NetCache ( CNetCacheAPI::TInstance  nc_client)
inline

Create Blob Storage.

Parameters
[in]nc_clientNetCache client - an instance of CNetCacheAPI.

Definition at line 618 of file netcache_api.hpp.

◆ CBlobStorage_NetCache() [3/3]

CBlobStorage_NetCache::CBlobStorage_NetCache ( const CBlobStorage_NetCache )
private

◆ CheckBlobSize()

size_t CheckBlobSize ( Uint8  blob_size)
inline

◆ ClearFlag()

void CNetCacheKey::ClearFlag ( ENCKeyFlag  flag)
inline

Definition at line 103 of file netcache_key.hpp.

References CNetCacheKey::m_Flags.

◆ Close() [1/2]

void CNetCacheReader::Close ( void  )
virtual

◆ Close() [2/2]

void CNetCacheWriter::Close ( void  )
virtual

◆ CNetCacheAdmin() [1/3]

CNetCacheAdmin::CNetCacheAdmin ( )
inline

Definition at line 56 of file netcache_admin.hpp.

◆ CNetCacheAdmin() [2/3]

CNetCacheAdmin::CNetCacheAdmin ( EVoid  )
inline

Definition at line 56 of file netcache_admin.hpp.

◆ CNetCacheAdmin() [3/3]

CNetCacheAdmin::CNetCacheAdmin ( SNetCacheAdminImpl impl)
inline

Definition at line 56 of file netcache_admin.hpp.

◆ CNetCacheAPI() [1/8]

CNetCacheAPI::CNetCacheAPI ( )
inline

Definition at line 144 of file netcache_api.hpp.

◆ CNetCacheAPI() [2/8]

CNetCacheAPI::CNetCacheAPI ( CConfig conf,
const string conf_section = kEmptyStr,
CNetScheduleAPI::TInstance  ns_api = NULL 
)
explicit

Constructs a CNetCacheAPI object and initializes it with parameters read from the specified configuration object.

Parameters
confA CConfig object to get the configuration parameters from.
conf_sectionName of the configuration section where to look for the parameters. If empty string is passed, then the section name "netcache_api" will be used.

Definition at line 476 of file netcache_api.cpp.

◆ CNetCacheAPI() [3/8]

CNetCacheAPI::CNetCacheAPI ( const IRegistry reg,
const string conf_section = kEmptyStr,
CNetScheduleAPI::TInstance  ns_api = NULL 
)
explicit

Constructs a CNetCacheAPI object and initializes it with parameters read from the specified registry object.

Parameters
regRegistry to get the configuration parameters from.
conf_sectionName of the registry section to look for the configuration parameters in. If empty string is passed, then the section name "netcache_api" will be used.

Definition at line 469 of file netcache_api.cpp.

◆ CNetCacheAPI() [4/8]

CNetCacheAPI::CNetCacheAPI ( const string client_name,
CNetScheduleAPI::TInstance  ns_api = NULL 
)
explicit

Definition at line 483 of file netcache_api.cpp.

◆ CNetCacheAPI() [5/8]

CNetCacheAPI::CNetCacheAPI ( const string service_name,
const string client_name,
CNetScheduleAPI::TInstance  ns_api = NULL 
)

Construct client, working with the specified service.

Definition at line 490 of file netcache_api.cpp.

◆ CNetCacheAPI() [6/8]

CNetCacheAPI::CNetCacheAPI ( CNetCacheAPI::EAppRegistry  use_app_reg,
const string conf_section = kEmptyStr,
CNetScheduleAPI::TInstance  ns_api = NULL 
)
explicit

Creates an instance of CNetCacheAPI and initializes it with parameters read from the application registry.

Parameters
use_app_regSelects this constructor. The parameter is not used otherwise.
conf_sectionName of the registry section to look for the configuration parameters in. If empty string is passed, then the section name "netcache_api" will be used.

Definition at line 461 of file netcache_api.cpp.

◆ CNetCacheAPI() [7/8]

CNetCacheAPI::CNetCacheAPI ( EVoid  )
inline

Definition at line 144 of file netcache_api.hpp.

◆ CNetCacheAPI() [8/8]

CNetCacheAPI::CNetCacheAPI ( SNetCacheAPIImpl impl)
inline

Definition at line 144 of file netcache_api.hpp.

◆ CNetCacheAPIParameters() [1/2]

CNetCacheAPIParameters::CNetCacheAPIParameters ( const CNetCacheAPIParameters defaults)

Definition at line 41 of file netcache_params.cpp.

◆ CNetCacheAPIParameters() [2/2]

CNetCacheAPIParameters::CNetCacheAPIParameters ( EVoid  )
inline

Definition at line 71 of file netcache_params.hpp.

◆ CNetCacheKey() [1/2]

CNetCacheKey::CNetCacheKey ( )
inline

Create an empty object for later use with ParseBlobKey() or Assign().

Definition at line 77 of file netcache_key.hpp.

◆ CNetCacheKey() [2/2]

CNetCacheKey::CNetCacheKey ( const string key_str,
CCompoundIDPool::TInstance  id_pool = NULL 
)
explicit

Create the key out of string.

Definition at line 306 of file netcache_key.cpp.

References CNetCacheKey::Assign().

◆ CNetCacheReader()

CNetCacheReader::CNetCacheReader ( SNetCacheAPIImpl impl,
const string blob_id,
CNetServer::SExecResult exec_result,
size_t *  blob_size_ptr,
const CNetCacheAPIParameters parameters 
)

◆ CNetCacheWriter()

CNetCacheWriter::CNetCacheWriter ( SNetCacheAPIImpl impl,
string blob_id,
const string key,
ENetCacheResponseType  response_type,
const CNetCacheAPIParameters parameters 
)

◆ CNetICacheClient() [1/7]

CNetICacheClient::CNetICacheClient ( CConfig config = NULL,
const string driver_name = kEmptyStr 
)

Definition at line 241 of file neticache_client.cpp.

◆ CNetICacheClient() [2/7]

CNetICacheClient::CNetICacheClient ( const IRegistry reg,
const string conf_section = kEmptyStr 
)

Definition at line 247 of file neticache_client.cpp.

◆ CNetICacheClient() [3/7]

CNetICacheClient::CNetICacheClient ( const string host,
unsigned short  port,
const string cache_name,
const string client_name 
)

Definition at line 221 of file neticache_client.cpp.

◆ CNetICacheClient() [4/7]

CNetICacheClient::CNetICacheClient ( const string service_name,
const string cache_name,
const string client_name 
)

Definition at line 232 of file neticache_client.cpp.

◆ CNetICacheClient() [5/7]

CNetICacheClient::CNetICacheClient ( EAppRegistry  use_app_reg,
const string conf_section = kEmptyStr 
)
explicit

Create an instance of CNetICacheClient and initialize it with parameters read from the application registry.

Parameters
use_app_regSelects this constructor. The parameter is not used otherwise.
conf_sectionName of the registry section to look for the configuration parameters in. If an empty string is passed, the default section name "netcache" is used.

Definition at line 214 of file neticache_client.cpp.

◆ CNetICacheClient() [6/7]

CNetICacheClient::CNetICacheClient ( EVoid  )
inline

Definition at line 72 of file neticache_client.hpp.

◆ CNetICacheClient() [7/7]

CNetICacheClient::CNetICacheClient ( SNetICacheClientImpl impl)
inline

Definition at line 72 of file neticache_client.hpp.

◆ CreateEmptyBlob()

string CBlobStorage_NetCache::CreateEmptyBlob ( )
virtual

Create an new blob.

Returns
Newly create blob key

Implements IBlobStorage.

Definition at line 1087 of file netcache_api.cpp.

References CBlobStorage_NetCache::m_NCClient, NULL, and CNetCacheAPI::PutData().

Referenced by CCgiSession_NetCache::CreateNewSession().

◆ CreateOStream() [1/2]

CNcbiOstream & CBlobStorage_NetCache::CreateOStream ( string data_id,
ELockMode  lock_mode = eLockNoWait 
)
virtual

Get an output stream to a blob.

Parameters
[in,out]blob_keyBlob key to read. If a blob with a given key does not exist an key of a newly create blob will be assigned to blob_key
[in]lock_modeBlob locking mode

Implements IBlobStorage.

Definition at line 1080 of file netcache_api.cpp.

References CNetCacheAPI::CreateOStream(), ncbi::grid::netcache::search::fields::key, CBlobStorage_NetCache::m_NCClient, and CBlobStorage_NetCache::m_OStream.

Referenced by CCgiSession_NetCache::GetAttrOStream(), and CCgiSession_NetCache::Reset().

◆ CreateOStream() [2/2]

CNcbiOstream * CNetCacheAPI::CreateOStream ( string key,
const CNamedParameterList optional = NULL 
)

Create a stream object for sending data to a blob.

If the string "key" is empty, a new blob will be created and its ID will be returned via the "key" parameter.

Note
The blob will not be available from NetCache until the stream is destructed.

Definition at line 634 of file netcache_api.cpp.

References CRWStreambuf::fLeakExceptions, CRWStreambuf::fOwnWriter, ncbi::grid::netcache::search::fields::key, NULL, and CNetCacheAPI::PutData().

Referenced by CProjectStorage::Clone(), CBlobStorage_NetCache::CreateOStream(), CSampleNetCacheClient::DemoCompression(), CProjectStorage::SaveRawData(), and CProjectStorage::x_GetOutputStream().

◆ DeleteBlob()

void CBlobStorage_NetCache::DeleteBlob ( const string data_id)
virtual

Delete a blob.

Parameters
[in]blob_keyBlob key to read

Implements IBlobStorage.

Definition at line 1092 of file netcache_api.cpp.

References CBlobStorage_NetCache::m_NCClient, and CNetCacheAPI::Remove().

Referenced by CCgiSession_NetCache::DeleteSession(), and CCgiSession_NetCache::RemoveAttribute().

◆ Eof()

bool CNetCacheReader::Eof ( void  ) const
inline

Definition at line 92 of file netcache_rw.hpp.

References CNetCacheReader::m_BlobBytesToRead.

◆ EstablishConnection()

void CNetCacheWriter::EstablishConnection ( )
private

◆ Flush()

ERW_Result CNetCacheWriter::Flush ( void  )
virtual

Flush pending data (if any) down to the output device.

Implements IWriter.

Definition at line 280 of file netcache_rw.cpp.

References eRW_Success, CNetCacheWriter::IsConnectionOpen(), CNetCacheWriter::m_CachingEnabled, and CNetCacheWriter::m_TransmissionWriter.

◆ GenerateBlobKey()

void CNetCacheKey::GenerateBlobKey ( string key,
unsigned int  id,
const string host,
unsigned short  port,
unsigned int  ver,
unsigned int  rnd_num,
time_t  creation_time = 0 
)
static

Generate blob key string.

Please note that "id" is an integer issued by the NetCache server. Clients should not use this function with custom ids.

Definition at line 335 of file netcache_key.cpp.

References CNetCacheKey::CalculateChecksum(), NStr::IntToString(), ncbi::grid::netcache::search::fields::key, KEY_PREFIX, KEY_PREFIX_LENGTH, NULL, NStr::NumericToString(), tmp, NStr::UInt8ToString(), and NStr::UIntToString().

Referenced by CNCDistributionConf::GenerateBlobKey(), and CNetCacheKey::ParseBlobKey().

◆ GetAccessTime()

time_t CNetICacheClient::GetAccessTime ( const string key,
int  version,
const string subkey 
)
virtual

Return last access time for the specified cache entry.

Class implementation may want to implement access time based aging scheme for cache managed objects. In this case it needs to track time of every request to BLOB data.

Parameters
keyBLOB identification key
subkeyBLOB identification subkey
versionBLOB version
Returns
last access time
See also
TimeStampUpdatePolicy

Implements ICache.

Definition at line 609 of file neticache_client.cpp.

References NCBI_THROW.

◆ GetActualBlobAgePtr()

unsigned * CNetCacheAPIParameters::GetActualBlobAgePtr ( ) const

◆ GetAdmin()

CNetCacheAdmin CNetCacheAPI::GetAdmin ( )

◆ GetAge()

unsigned CNetCacheBlobTooOldException::GetAge ( ) const
inline

Definition at line 117 of file netcache_api_expt.hpp.

References CException::GetMsg(), and NULL.

Referenced by SNetICacheClientImpl::ReadCurrentBlobNotOlderThan().

◆ GetBlobAccess()

void CNetICacheClient::GetBlobAccess ( const string key,
int  version,
const string subkey,
SBlobAccessDescr blob_descr 
)
virtual

◆ GetBlobAsString()

string CBlobStorage_NetCache::GetBlobAsString ( const string data_id)
virtual

Get a blob content as a string.

Parameters
[in]blob_keyBlob key to read

Implements IBlobStorage.

Definition at line 1073 of file netcache_api.cpp.

References buf, CBlobStorage_NetCache::m_NCClient, and CNetCacheAPI::ReadData().

Referenced by CCgiSession_NetCache::LoadSession().

◆ GetBlobID() [1/2]

const string& CNetCacheReader::GetBlobID ( ) const
inline

Definition at line 88 of file netcache_rw.hpp.

References CNetCacheReader::m_BlobID.

◆ GetBlobID() [2/2]

const string& CNetCacheWriter::GetBlobID ( ) const
inline

◆ GetBlobId()

unsigned int CNetCacheKey::GetBlobId ( const string key_str)
static

Parse blob key, extract id.

Definition at line 410 of file netcache_key.cpp.

References ncbi::grid::netcache::search::fields::key.

◆ GetBlobInfo() [1/2]

CNetServerMultilineCmdOutput CNetCacheAPI::GetBlobInfo ( const string blob_id,
const CNamedParameterList optional = NULL 
)

Return a CNetServerMultilineCmdOutput object for reading meta information about the specified blob.

Note
This does not update the blob's expiration time.

Definition at line 709 of file netcache_api.cpp.

References cmd, ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), CNetCacheAPI::m_Impl, and output.

Referenced by CGridCommandLineInterfaceApp::Cmd_BlobInfo(), CSampleNetCacheClient::DemoPutRead(), SNetStorage_NetCacheBlob::GetInfo(), and CNetCacheAPI::PrintBlobInfo().

◆ GetBlobInfo() [2/2]

CNetServerMultilineCmdOutput CNetICacheClient::GetBlobInfo ( const string key,
int  version,
const string subkey,
const CNamedParameterList optional = NULL 
)

◆ GetBlobOwner()

void CNetICacheClient::GetBlobOwner ( const string key,
int  version,
const string subkey,
string owner 
)
virtual

Retrieve BLOB owner.

Parameters
ownerBLOB owner (as used by method Store)
See also
Store, GetWriteStream

Implements ICache.

Definition at line 434 of file neticache_client.cpp.

References ERR_POST, and kEmptyStr.

◆ GetBlobSize() [1/3]

Uint8 CNetCacheReader::GetBlobSize ( ) const
inline

Definition at line 90 of file netcache_rw.hpp.

References CNetCacheReader::m_BlobSize.

◆ GetBlobSize() [2/3]

size_t CNetCacheAPI::GetBlobSize ( const string blob_id,
const CNamedParameterList optional = NULL 
)

Returns the size of the BLOB identified by the "key" parameter.

Note
This updates the blob's expiration time.
Parameters
keyThe key of the BLOB the size of which to be returned.
optionalAn optional list of named blob creation parameters in the form of (param_name = param_value, ...).
See also
NetCacheClientParams
Returns
Size of the BLOB in bytes.

Definition at line 669 of file netcache_api.cpp.

References CheckBlobSize(), ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), CNetCacheAPI::m_Impl, and NStr::StringToUInt8().

Referenced by CGridCommandLineInterfaceApp::Cmd_BlobInfo(), CSampleNetCacheClient::DemoPartialRead(), SNetStorage_NetCacheBlob::GetInfo(), SNetStorage_NetCacheBlob::GetSize(), and CGridCommandLineInterfaceApp::NetCacheSanityCheck().

◆ GetBlobSize() [3/3]

size_t CNetICacheClient::GetBlobSize ( const string key,
int  version,
const string subkey,
const CNamedParameterList optional = NULL 
)

◆ GetCacheName() [1/2]

string CNetCacheAPIParameters::GetCacheName ( void  ) const

◆ GetCacheName() [2/2]

string CNetICacheClient::GetCacheName ( void  ) const
virtual

◆ GetCachingMode()

CNetCacheAPI::ECachingMode CNetCacheAPIParameters::GetCachingMode ( ) const

◆ GetCommunicationTimeout()

STimeout CNetICacheClient::GetCommunicationTimeout ( ) const

Definition at line 259 of file neticache_client.cpp.

References CNetICacheClient::m_Impl.

◆ GetCompoundIDPool()

CCompoundIDPool CNetCacheAPI::GetCompoundIDPool ( )

◆ GetCreationTime()

time_t CNetCacheKey::GetCreationTime ( ) const
inline

Definition at line 207 of file netcache_key.hpp.

References CNetCacheKey::m_CreationTime.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetData() [1/3]

CNetCacheAPI::EReadResult CNetCacheAPI::GetData ( const string key,
CSimpleBuffer buffer,
const CNamedParameterList optional = NULL 
)

Retrieve BLOB from server by key This method retrieves BLOB size, allocates memory and gets all the data from the server.

Blob size and binary data is placed into blob_to_read structure. Do not use this method if you are not sure you have memory to load the whole BLOB.

Returns
eReadComplete if BLOB found (eNotFound otherwise)

Definition at line 895 of file netcache_api.cpp.

References buffer, CNetCacheAPI::eNotFound, CNetCacheAPI::GetData(), ncbi::grid::netcache::search::fields::key, CNetCacheAPI::m_Impl, and NULL.

◆ GetData() [2/3]

IReader * CNetCacheAPI::GetData ( const string key,
size_t *  blob_size = NULL,
const CNamedParameterList optional = NULL 
)

Retrieve BLOB from server by key.

Caller is responsible for deletion of the IReader* object. It must be deleted before the destruction of CNetCacheAPI.

Note
IReader implementation used here is based on TCP/IP sockets; when reading the blob, please remember to check IReader::Read return codes, it may not be able to read the whole blob in one call because of network delays.
See also
CNetCacheAPI::GetReader() for details.
Parameters
keyBLOB key to read (returned by PutData)
blob_sizePointer to the memory location where the size of the requested blob will be stored.
optionalAn optional list of named blob creation parameters in the form of (param_name = param_value, ...).
See also
NetCacheClientParams
Returns
If the requested blob is found, the method returns a pointer to the IReader interface for reading the blob contents (the caller must delete it). If the blob is not found (that is, if it's expired), NULL is returned.

Definition at line 800 of file netcache_api.cpp.

References CNetCacheException::eAccessDenied, CNetCacheException::eBlobNotFound, CException::GetErrCode(), CNetCacheAPI::GetReader(), ncbi::grid::netcache::search::fields::key, and NULL.

Referenced by CProjectStorage::Clone(), CNetCacheAPI::GetData(), and CGridCommandLineInterfaceApp::NetCacheSanityCheck().

◆ GetData() [3/3]

CNetCacheAPI::EReadResult CNetCacheAPI::GetData ( const string key,
void *  buf,
size_t  buf_size,
size_t *  n_read = 0,
size_t *  blob_size = 0,
const CNamedParameterList optional = NULL 
)

Retrieve BLOB from server by key.

Note
Function waits for enough data to arrive.

Definition at line 873 of file netcache_api.cpp.

References _ASSERT, buf, CNetCacheAPI::eNotFound, CNetCacheAPI::GetData(), ncbi::grid::netcache::search::fields::key, and CNetCacheAPI::m_Impl.

◆ GetErrCodeString() [1/2]

virtual const char* CNetCacheException::GetErrCodeString ( void  ) const
inlineoverridevirtual

◆ GetErrCodeString() [2/2]

virtual const char* CNetCacheBlobTooOldException::GetErrCodeString ( void  ) const
inlineoverridevirtual

Get error code interpreted as text.

Reimplemented from CNetCacheException.

Definition at line 109 of file netcache_api_expt.hpp.

References CNetCacheBlobTooOldException::eBlobTooOld, CException::GetErrCode(), and CException::GetErrCodeString().

◆ GetFlag()

bool CNetCacheKey::GetFlag ( ENCKeyFlag  flag) const
inline

Definition at line 101 of file netcache_key.hpp.

References CNetCacheKey::m_Flags.

◆ GetFlags() [1/2]

ICache::TFlags CNetICacheClient::GetFlags ( )
virtual

Retrieve the effective combination of flags from the underlying storage.

Implements ICache.

Definition at line 343 of file neticache_client.cpp.

References CNetICacheClient::m_Impl.

◆ GetFlags() [2/2]

TNCKeyFlags CNetCacheKey::GetFlags ( ) const
inline

Definition at line 100 of file netcache_key.hpp.

References CNetCacheKey::m_Flags.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetHost()

const string & CNetCacheKey::GetHost ( void  ) const
inline

Definition at line 185 of file netcache_key.hpp.

References CNetCacheKey::m_Host.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetHostPortCRC32()

unsigned CNetCacheKey::GetHostPortCRC32 ( ) const
inline

Definition at line 196 of file netcache_key.hpp.

References CNetCacheKey::m_HostPortCRC32.

◆ GetId()

unsigned int CNetCacheKey::GetId ( void  ) const
inline

Definition at line 179 of file netcache_key.hpp.

References CNetCacheKey::m_Id.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetIStream() [1/2]

CNcbiIstream & CBlobStorage_NetCache::GetIStream ( const string data_id,
size_t *  blob_size_ptr = 0,
ELockMode  lock_mode = eLockWait 
)
virtual

Get an input stream to a blob.

Parameters
[in]blob_keyBlob key to read
[out]blob_size_ptrif blob_size_ptr if not NULL the size of a blob is returned
[in]lock_modeBlob locking mode

Implements IBlobStorage.

Definition at line 1065 of file netcache_api.cpp.

References CNetCacheAPI::GetIStream(), ncbi::grid::netcache::search::fields::key, CBlobStorage_NetCache::m_IStream, and CBlobStorage_NetCache::m_NCClient.

Referenced by CCgiSession_NetCache::GetAttrIStream().

◆ GetIStream() [2/2]

CNcbiIstream * CNetCacheAPI::GetIStream ( const string key,
size_t *  blob_size = NULL,
const CNamedParameterList optional = NULL 
)

◆ GetKey() [1/2]

const string & CNetCacheKey::GetKey ( void  ) const
inline

Definition at line 173 of file netcache_key.hpp.

References CNetCacheKey::m_Key.

◆ GetKey() [2/2]

const string& CNetCacheWriter::GetKey ( void  ) const
inline

Definition at line 141 of file netcache_rw.hpp.

References CNetCacheWriter::m_Key.

◆ GetMaxBlobAge()

unsigned CNetCacheAPIParameters::GetMaxBlobAge ( ) const

◆ GetMirroringMode()

CNetCacheAPI::EMirroringMode CNetCacheAPIParameters::GetMirroringMode ( ) const

◆ GetNetCacheAPI()

CNetCacheAPI CBlobStorage_NetCache::GetNetCacheAPI ( ) const
inline

Definition at line 669 of file netcache_api.hpp.

References CBlobStorage_NetCache::m_NCClient.

◆ GetNetCacheWriter()

IEmbeddedStreamWriter * CNetICacheClient::GetNetCacheWriter ( const string key,
int  version,
const string subkey,
const CNamedParameterList optional = NULL 
)

Create or update the specified blob.

This method is blocking – it waits for a confirmation from NetCache after all data is transferred. Since blob EOF marker is sent in the destructor, the blob will not be created until the stream is deleted.

Parameters
keyICache key
versionICache key version
subkeyICache subkey
time_to_liveBLOB time to live value in seconds. 0 - server side default is assumed.
caching_modeDefines whether to enable file caching.
Returns
IEmbeddedStreamWriter* (caller must delete it).

Definition at line 576 of file neticache_client.cpp.

References eICache_NoWait, eNetCache_Wait, ICache::fBestReliability, ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), CNetICacheClient::m_Impl, s_KeyVersionSubkeyToBlobID(), ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CGridCommandLineInterfaceApp::Cmd_PutBlob(), NAutomation::SNetCacheService::GetWriter(), CNetICacheClient::GetWriteStream(), and NDirectNetStorageImpl::CNetCache::StartWrite().

◆ GetPartReader()

IReader * CNetCacheAPI::GetPartReader ( const string key,
size_t  offset,
size_t  part_size,
size_t *  blob_size = NULL,
const CNamedParameterList optional = NULL 
)

Get a pointer to the IReader interface to read a portion of the blob contents.

See the description of GetReader() for details. The Read() method of the returned IReader interface implementation is not blocking.

See also
CNetCacheAPI::GetReader() for details.

Definition at line 772 of file netcache_api.cpp.

References ncbi::grid::netcache::search::fields::key, CNetCacheAPI::m_Impl, and offset.

Referenced by CGridCommandLineInterfaceApp::Cmd_GetBlob(), and CNetCacheAPI::ReadPart().

◆ GetPassword()

std::string CNetCacheAPIParameters::GetPassword ( void  ) const

◆ GetPort()

unsigned short CNetCacheKey::GetPort ( void  ) const
inline

Definition at line 191 of file netcache_key.hpp.

References CNetCacheKey::m_Port.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetRandomPart()

Uint4 CNetCacheKey::GetRandomPart ( ) const
inline

◆ GetReader()

IReader * CNetCacheAPI::GetReader ( const string key,
size_t *  blob_size = NULL,
const CNamedParameterList optional = NULL 
)

Get a pointer to the IReader interface to read blob contents.

This is a safe version of the GetData method having the same signature. Unlike GetData, GetReader will throw an exception if the requested blob is not found.

Note
The Read() method of the returned IReader object is not blocking. A reading completion loop is required, see an example below.
size_t blob_size;
unique_ptr<IReader> reader(nc_api.GetReader(key, &blob_size,
size_t bytes_read;
size_t total_bytes_read = 0;
while (buf_size > 0) {
ERW_Result rw_res = reader->Read(buf_ptr, buf_size, &bytes_read);
if (rw_res == eRW_Success) {
total_bytes_read += bytes_read;
buf_ptr += bytes_read;
buf_size -= bytes_read;
} else if (rw_res == eRW_Eof) {
break;
} else {
NCBI_THROW(CNetServiceException, eCommunicationError,
"Error while reading BLOB");
}
}
return total_bytes_read;
Net Service exception.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
#define nc_caching_mode
Caching mode.
ERW_Result
Result codes for I/O operations.
@ eRW_Eof
End of data, should be considered permanent.
@ eRW_Success
Everything is okay, I/O completed.
const struct ncbi::grid::netcache::search::fields::KEY key

Definition at line 766 of file netcache_api.cpp.

References ncbi::grid::netcache::search::fields::key, and CNetCacheAPI::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_GetBlob(), CStringOrBlobStorageReader::CStringOrBlobStorageReader(), CSampleNetCacheClient::DemoIWriterIReader(), CNetCacheAPI::GetData(), CNetCacheAPI::GetIStream(), NAutomation::SNetCacheService::GetReader(), and CGridCommandLineInterfaceApp::NetCacheSanityCheck().

◆ GetReadStream() [1/3]

IReader * CNetICacheClient::GetReadStream ( const string key,
const string subkey,
int version,
ICache::EBlobVersionValidity validity 
)
virtual

Read a lengthy blob via the IReader interface.

The Read() method of the returned implementation is not blocking. The caller must provide a reading completion loop for the Read() call.

See also
CNetCacheAPI::GetReader() for an example.

Implements ICache.

Definition at line 699 of file neticache_client.cpp.

References ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, NULL, ncbi::grid::netcache::search::fields::subkey, and version.

◆ GetReadStream() [2/3]

IReader * CNetICacheClient::GetReadStream ( const string key,
int  version,
const string subkey 
)
virtual

Read a lengthy blob via the IReader interface.

The Read() method of the returned implementation is not blocking. The caller must provide a reading completion loop for the Read() call.

See also
CNetCacheAPI::GetReader() for an example.

Implements ICache.

Definition at line 682 of file neticache_client.cpp.

References CNetCacheAPI::eCaching_AppDefault, CNetICacheClient::GetReadStream(), ncbi::grid::netcache::search::fields::key, nc_caching_mode, NULL, ncbi::grid::netcache::search::fields::subkey, and version.

◆ GetReadStream() [3/3]

IReader * CNetICacheClient::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.

The Read() method of the returned implementation is not blocking. The caller must provide a reading completion loop for the Read() call.

See also
CNetCacheAPI::GetReader() for an example.

Definition at line 658 of file neticache_client.cpp.

References CNetICacheClient::GetReadStreamPart(), ncbi::grid::netcache::search::fields::key, ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CGridCommandLineInterfaceApp::Cmd_GetBlob(), CDataCrawlerCache::GetReadStream(), CNetICacheClient::GetReadStream(), and CGraphTrack::x_LoadSettings().

◆ GetReadStreamPart()

IReader * CNetICacheClient::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.

The IReader implementation returned is NOT blocking: its Read() method may return a partial result before the requested amount of data is retrieved. The Read() call must be placed within a loop that completes data retrieval.

See also
CNetCacheAPI::GetReader() for an example.
Parameters
keyICache key
versionICache key version
subkeyICache subkey
offsetOffset in the blob at which to start reading it.
part_sizeMaximum number of bytes to read with this call.
blob_size_ptrIf not NULL, this parameter must point to a variable that will receive the total blob size in bytes.
caching_modeDefines whether to enable file caching.
server_to_useExplicitly define the server to use for reading.
Returns
IReader* (to be deleted by the caller).

Definition at line 669 of file neticache_client.cpp.

References ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, offset, ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CGridCommandLineInterfaceApp::Cmd_GetBlob(), and CNetICacheClient::GetReadStream().

◆ GetResponseType()

ENetCacheResponseType CNetCacheWriter::GetResponseType ( ) const
inline

Definition at line 138 of file netcache_rw.hpp.

References CNetCacheWriter::m_ResponseType.

Referenced by SNetICacheClientImpl::InitiateWriteCmd().

◆ GetServerCheck()

bool CNetCacheAPIParameters::GetServerCheck ( ESwitch server_check) const

◆ GetServerCheckHint()

bool CNetCacheAPIParameters::GetServerCheckHint ( bool server_check_hint) const

◆ GetServerLastUsedPtr()

CNetServer * CNetCacheAPIParameters::GetServerLastUsedPtr ( ) const

◆ GetServerToUse()

CNetServer CNetCacheAPIParameters::GetServerToUse ( ) const

◆ GetServerVersion()

void CNetCacheAdmin::GetServerVersion ( CNcbiOstream output_stream)

Definition at line 117 of file netcache_api_admin.cpp.

References CNetCacheAdmin::m_Impl.

◆ GetService() [1/2]

CNetService CNetCacheAPI::GetService ( )

◆ GetService() [2/2]

CNetService CNetICacheClient::GetService ( )

◆ GetServiceName()

const string & CNetCacheKey::GetServiceName ( ) const
inline

Definition at line 217 of file netcache_key.hpp.

References CNetCacheKey::m_ServiceName.

Referenced by CNetCacheKey::KeyToCompoundID().

◆ GetSize()

size_t CNetICacheClient::GetSize ( const string key,
int  version,
const string subkey 
)
virtual

Check if BLOB exists, return BLOB size.

Parameters
keyBLOB identification key
subkeyBLOB identification subkey
versionBLOB version
Returns
BLOB size or 0 if it doesn't exist or expired

Implements ICache.

Definition at line 414 of file neticache_client.cpp.

References CNetICacheClient::GetBlobSize(), ncbi::grid::netcache::search::fields::key, ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CDataCrawlerCache::GetReadSize().

◆ GetSubkeyList()

list<string> CNetICacheClient::GetSubkeyList ( const string key)
inline

◆ GetTimeout()

int CNetICacheClient::GetTimeout ( ) const
virtual

Get expiration timeout.

Returns
Expiration timeout in seconds
See also
SetTimeStampPolicy

Implements ICache.

Definition at line 367 of file neticache_client.cpp.

References NCBI_THROW.

◆ GetTimeStampPolicy()

ICache::TTimeStampFlags CNetICacheClient::GetTimeStampPolicy ( ) const
virtual

Get timestamp policy.

Returns
Timestamp policy

Implements ICache.

Definition at line 361 of file neticache_client.cpp.

References NCBI_THROW.

◆ GetTryAllServers()

bool CNetCacheAPIParameters::GetTryAllServers ( ) const

◆ GetTTL()

unsigned CNetCacheAPIParameters::GetTTL ( void  ) const

◆ GetUseCompoundID()

bool CNetCacheAPIParameters::GetUseCompoundID ( ) const

Definition at line 199 of file netcache_params.cpp.

References NETCACHE_API_GET_PARAM_IMPL.

Referenced by SNetCacheAPIImpl::InitiateWriteCmd().

◆ GetVersion() [1/2]

int CNetCacheBlobTooOldException::GetVersion ( void  ) const
inline

Definition at line 125 of file netcache_api_expt.hpp.

References CException::GetMsg(), and NULL.

Referenced by SNetICacheClientImpl::ReadCurrentBlobNotOlderThan().

◆ GetVersion() [2/2]

unsigned int CNetCacheKey::GetVersion ( void  ) const
inline

◆ GetVersionRetention()

ICache::EKeepVersions CNetICacheClient::GetVersionRetention ( ) const
virtual

Get version retention.

Implements ICache.

Definition at line 385 of file neticache_client.cpp.

References NCBI_THROW.

◆ GetWriteStream()

IWriter * CNetICacheClient::GetWriteStream ( const string key,
int  version,
const string subkey,
unsigned int  time_to_live = 0,
const string owner = kEmptyStr 
)
virtual

Return sequential stream interface to write BLOB data.

Parameters
keyBLOB identification key
subkeyBLOB identification subkey
versionBLOB version
time_to_liveIndividual timeout
Returns
Interface pointer or NULL if BLOB does not exist

Implements ICache.

Definition at line 566 of file neticache_client.cpp.

References CNetICacheClient::GetNetCacheWriter(), ncbi::grid::netcache::search::fields::key, nc_blob_ttl, ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CDataCrawlerCache::GetWriteStream(), and CGraphTrack::x_OnJobCompleted().

◆ HasBlob() [1/2]

bool CNetCacheAPI::HasBlob ( const string blob_id,
const CNamedParameterList optional = NULL 
)

Check if the BLOB identified by the key "key" exists.

Parameters
keyKey of the BLOB to check for existence.
optionalAn optional list of named blob creation parameters in the form of (param_name = param_value, ...).
See also
NetCacheClientParams
Returns
True, if the BLOB exists; false otherwise.

Definition at line 653 of file netcache_api.cpp.

References ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), and CNetCacheAPI::m_Impl.

Referenced by SNetStorage_NetCacheBlob::Exists(), CProjectStorage::Exists(), SNetStorage_NetCacheBlob::GetInfo(), and SNetStorage_NetCacheBlob::Remove().

◆ HasBlob() [2/2]

bool CNetICacheClient::HasBlob ( const string key,
const string subkey,
const CNamedParameterList optional = NULL 
)

◆ HasBlobs()

bool CNetICacheClient::HasBlobs ( const string key,
const string subkey 
)
virtual

◆ HasExtensions()

bool CNetCacheKey::HasExtensions ( ) const
inline

Definition at line 89 of file netcache_key.hpp.

References CNetCacheKey::m_Key, and CNetCacheKey::m_PrimaryKey.

Referenced by CNCBlobKey::Assign().

◆ IsConnectionOpen()

bool CNetCacheWriter::IsConnectionOpen ( )
inlineprivate

◆ IsKeyValid()

bool CBlobStorage_NetCache::IsKeyValid ( const string str)
virtual

Check if a given string is a valid key.

The implementation should not make any connection to the storage, it just checks the str structure.

Implements IBlobStorage.

Definition at line 1060 of file netcache_api.cpp.

References CNetCacheAPI::GetCompoundIDPool(), CNetCacheKey::IsValidKey(), CBlobStorage_NetCache::m_NCClient, and str().

◆ IsOpen()

bool CNetICacheClient::IsOpen ( ) const
virtual
Returns
TRUE if cache is open and operational

Implements ICache.

Definition at line 373 of file neticache_client.cpp.

References NCBI_THROW.

◆ IsValidKey() [1/2]

static bool CNetCacheKey::IsValidKey ( const char *  key_str,
size_t  key_len,
CCompoundIDPool::TInstance  id_pool = NULL 
)
inlinestatic

◆ IsValidKey() [2/2]

static bool CNetCacheKey::IsValidKey ( const string key,
CCompoundIDPool::TInstance  id_pool = NULL 
)
inlinestatic

◆ KeyToCompoundID()

string CNetCacheKey::KeyToCompoundID ( const string key_str,
CCompoundIDPool  id_pool 
)
static

◆ LoadNamedParameters()

void CNetCacheAPIParameters::LoadNamedParameters ( const CNamedParameterList optional)

Definition at line 48 of file netcache_params.cpp.

References CNetCacheAPI::eNPT_ActualBlobAgePtr, CNetCacheAPI::eNPT_BlobTTL, CNetCacheAPI::eNPT_CacheName, CNetCacheAPI::eNPT_CachingMode, CNetCacheAPI::eNPT_MaxBlobAge, CNetCacheAPI::eNPT_MirroringMode, CNetCacheAPI::eNPT_Password, CNetCacheAPI::eNPT_ServerCheck, CNetCacheAPI::eNPT_ServerCheckHint, CNetCacheAPI::eNPT_ServerLastUsedPtr, CNetCacheAPI::eNPT_ServerToUse, CNetCacheAPI::eNPT_TryAllServers, CNetCacheAPI::eNPT_UseCompoundID, CNamedParameterList::Is(), CNamedParameterList::m_MoreParams, CNetCacheAPIParameters::SetActualBlobAgePtr(), CNetCacheAPIParameters::SetCacheName(), CNetCacheAPIParameters::SetCachingMode(), CNetCacheAPIParameters::SetMaxBlobAge(), CNetCacheAPIParameters::SetMirroringMode(), CNetCacheAPIParameters::SetPassword(), CNetCacheAPIParameters::SetServerCheck(), CNetCacheAPIParameters::SetServerCheckHint(), CNetCacheAPIParameters::SetServerLastUsedPtr(), CNetCacheAPIParameters::SetServerToUse(), CNetCacheAPIParameters::SetTryAllServers(), CNetCacheAPIParameters::SetTTL(), and CNetCacheAPIParameters::SetUseCompoundID().

Referenced by CNetCacheAPI::GetBlobInfo(), CNetICacheClient::GetBlobInfo(), CNetCacheAPI::GetBlobSize(), CNetICacheClient::GetBlobSize(), CNetICacheClient::GetNetCacheWriter(), SNetCacheAPIImpl::GetPartReader(), SNetICacheClientImpl::GetReadStreamPart(), CNetCacheAPI::HasBlob(), CNetICacheClient::HasBlob(), CNetCacheAPI::ProlongBlobLifetime(), CNetICacheClientExt::ProlongBlobLifetime(), CNetCacheAPI::PutData(), SNetICacheClientImpl::ReadCurrentBlobNotOlderThan(), CNetCacheAPI::Remove(), and CNetICacheClient::RemoveBlob().

◆ NCBI_DECLARE_INTERFACE_VERSION()

NCBI_DECLARE_INTERFACE_VERSION ( SNetCacheAPIImpl  ,
"xnetcacheapi"  ,
,
,
 
)

◆ NCBI_EntryPoint_xcache_netcache()

void NCBI_EntryPoint_xcache_netcache ( CPluginManager< ICache >::TDriverInfoList &  info_list,
CPluginManager< ICache >::EEntryPointRequest  method 
)

◆ NCBI_EntryPoint_xnetcacheapi()

void NCBI_EntryPoint_xnetcacheapi ( CPluginManager< SNetCacheAPIImpl >::TDriverInfoList &  info_list,
CPluginManager< SNetCacheAPIImpl >::EEntryPointRequest  method 
)

◆ NCBI_EXCEPTION_DEFAULT() [1/2]

CNetCacheBlobTooOldException::NCBI_EXCEPTION_DEFAULT ( CNetCacheBlobTooOldException  ,
CNetCacheException   
)

◆ NCBI_EXCEPTION_DEFAULT() [2/2]

CNetCacheException::NCBI_EXCEPTION_DEFAULT ( CNetCacheException  ,
CNetServiceException   
)

◆ operator const SNetCacheAdminImpl *()

CNetCacheAdmin::operator const SNetCacheAdminImpl * ( ) const
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator const SNetCacheAPIImpl *()

CNetCacheAPI::operator const SNetCacheAPIImpl * ( ) const
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator const SNetICacheClientImpl *()

CNetICacheClient::operator const SNetICacheClientImpl * ( ) const
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator SNetCacheAdminImpl *()

CNetCacheAdmin::operator SNetCacheAdminImpl * ( )
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator SNetCacheAPIImpl *()

CNetCacheAPI::operator SNetCacheAPIImpl * ( )
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator SNetICacheClientImpl *()

CNetICacheClient::operator SNetICacheClientImpl * ( )
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator--() [1/6]

SNetCacheAdminImpl& CNetCacheAdmin::operator-- ( int  )
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator--() [2/6]

SNetCacheAPIImpl& CNetCacheAPI::operator-- ( int  )
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator--() [3/6]

SNetICacheClientImpl& CNetICacheClient::operator-- ( int  )
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator--() [4/6]

const SNetCacheAdminImpl& CNetCacheAdmin::operator-- ( int  ) const
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator--() [5/6]

const SNetCacheAPIImpl& CNetCacheAPI::operator-- ( int  ) const
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator--() [6/6]

const SNetICacheClientImpl& CNetICacheClient::operator-- ( int  ) const
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator->() [1/6]

SNetCacheAdminImpl* CNetCacheAdmin::operator-> ( void  )
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator->() [2/6]

SNetCacheAPIImpl* CNetCacheAPI::operator-> ( void  )
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator->() [3/6]

SNetICacheClientImpl* CNetICacheClient::operator-> ( void  )
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator->() [4/6]

const SNetCacheAdminImpl* CNetCacheAdmin::operator-> ( void  ) const
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator->() [5/6]

const SNetCacheAPIImpl* CNetCacheAPI::operator-> ( void  ) const
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator->() [6/6]

const SNetICacheClientImpl* CNetICacheClient::operator-> ( void  ) const
inline

Definition at line 72 of file neticache_client.hpp.

◆ operator=() [1/4]

CBlobStorage_NetCache& CBlobStorage_NetCache::operator= ( CBlobStorage_NetCache )
private

◆ operator=() [2/4]

CNetCacheAdmin& CNetCacheAdmin::operator= ( SNetCacheAdminImpl impl)
inline

Definition at line 56 of file netcache_admin.hpp.

◆ operator=() [3/4]

CNetCacheAPI& CNetCacheAPI::operator= ( SNetCacheAPIImpl impl)
inline

Definition at line 144 of file netcache_api.hpp.

◆ operator=() [4/4]

CNetICacheClient& CNetICacheClient::operator= ( SNetICacheClientImpl impl)
inline

Definition at line 72 of file neticache_client.hpp.

Referenced by CNetICacheClientExt::operator=().

◆ ParseBlobKey()

bool CNetCacheKey::ParseBlobKey ( const char *  key_str,
size_t  key_len,
CNetCacheKey key_obj,
CCompoundIDPool::TInstance  id_pool = NULL 
)
static

Parse blob key string into a CNetCacheKey structure.

Definition at line 69 of file netcache_key.cpp.

References CNetCacheKey::AddExtensions(), crc32, eCIC_NetCacheBlobKey, eCIT_Flags, eCIT_Host, eCIT_ID, eCIT_IPv4SockAddr, eCIT_Port, eCIT_Random, eCIT_ServiceName, eCIT_Timestamp, CNetCacheKey::fNCKey_NoServerCheck, CNetCacheKey::fNCKey_SingleServer, CCompoundIDPool::FromString(), CNetCacheKey::GenerateBlobKey(), CCompoundID::GetClass(), CCompoundID::GetFirst(), CCompoundIDField::GetFlags(), CCompoundIDField::GetHost(), CCompoundIDField::GetID(), CCompoundIDField::GetIPv4Address(), CCompoundIDField::GetPort(), CCompoundIDField::GetRandom(), CCompoundIDField::GetServiceName(), CCompoundIDField::GetTimestamp(), int, isalnum(), isdigit(), kEmptyStr, ncbi::grid::netcache::search::fields::key, KEY_EXTENSION_MARKER, KEY_EXTENSION_MARKER_LENGTH, KEY_PREFIX_LENGTH, CNetCacheKey::m_CreationTime, CNetCacheKey::m_Flags, CNetCacheKey::m_Host, CNetCacheKey::m_HostPortCRC32, CNetCacheKey::m_Id, CNetCacheKey::m_Key, CNetCacheKey::m_Port, CNetCacheKey::m_PrimaryKey, CNetCacheKey::m_Random, CNetCacheKey::m_ServiceName, CNetCacheKey::m_Version, CSocketAPI::ntoa(), NULL, PARSE_KEY_PART, PARSE_NUMERIC_KEY_PART, s_KeyPrefix, CNetCacheKey::SetFlag(), NStr::SplitInTwo(), NStr::StartsWith(), and string.

Referenced by CNCBlobKey::Assign(), CNetCacheKey::Assign(), CGridCommandLineInterfaceApp::Cmd_WhatIs(), g_WhatIs(), SNetStorageRPC::GetServiceIfLocator(), CNCDistributionConf::GetSlotByNetCacheKey(), CNetCacheKey::IsValidKey(), CNCBlobKeyLight::KeyVersion(), and CGridClient::x_RenewAllJobBlobs().

◆ PendingCount()

ERW_Result CNetCacheReader::PendingCount ( size_t *  count)
virtual

Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.

Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.

Implements IReader.

Definition at line 167 of file netcache_rw.cpp.

References eRW_Success, CNetCacheReader::m_BlobBytesToRead, CNetCacheReader::m_CachingEnabled, CNetCacheReader::m_Connection, SNetServerConnectionImpl::m_Socket, MAX_PENDING_COUNT, and CSocketReaderWriter::PendingCount().

◆ PrintBlobInfo() [1/2]

void CNetCacheAPI::PrintBlobInfo ( const string blob_key,
const CNamedParameterList optional = NULL 
)

Print meta information about the specified blob.

Definition at line 732 of file netcache_api.cpp.

References CNetCacheAPI::GetBlobInfo(), NcbiCout, NcbiEndl, output, and NStr::StartsWith().

◆ PrintBlobInfo() [2/2]

void CNetICacheClient::PrintBlobInfo ( const string key,
int  version,
const string subkey 
)

◆ PrintConfig()

void CNetCacheAdmin::PrintConfig ( CNcbiOstream output_stream)

Print contents of the configuration file.

Definition at line 87 of file netcache_api_admin.cpp.

References CNetCacheAdmin::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_GetConf().

◆ PrintHealth()

void CNetCacheAdmin::PrintHealth ( CNcbiOstream output_stream)

Definition at line 112 of file netcache_api_admin.cpp.

References CNetCacheAdmin::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_Health().

◆ PrintStat()

void CNetCacheAdmin::PrintStat ( CNcbiOstream output_stream,
const string aggregation_period = kEmptyStr,
CNetCacheAdmin::EStatPeriodCompleteness  period_completeness = eReturnCurrentPeriod 
)

Print server statistics.

Parameters
output_streamStream for printing the GETSTAT command output.
aggregation_periodStatistics aggregation interval to print ('1min', '1h', 'life', and so on).
period_completenessWhether to print statistics for the previous (complete) aggregation interval (as opposed to printing the current but incomplete statistics).

Definition at line 92 of file netcache_api_admin.cpp.

References cmd, CNetCacheAdmin::eReturnCurrentPeriod, CNetCacheAdmin::m_Impl, and NStr::PrintableString().

Referenced by CGridCommandLineInterfaceApp::Cmd_Stats().

◆ ProlongBlobLifetime()

void CNetCacheAPI::ProlongBlobLifetime ( const string blob_key,
unsigned  ttl,
const CNamedParameterList optional = NULL 
)

◆ Purge() [1/3]

void CNetCacheAdmin::Purge ( const string cache_name)

Remove all blobs from an ICache database.

Definition at line 80 of file netcache_api_admin.cpp.

References cmd, CNetCacheAdmin::m_Impl, and NStr::PrintableString().

Referenced by CGridCommandLineInterfaceApp::Cmd_Purge().

◆ Purge() [2/3]

void CNetICacheClient::Purge ( const string key,
const string subkey,
time_t  access_timeout 
)
virtual

Delete BLOBs with access time older than specified.

Function finds all BLOB versions with the specified key and removes the old instances.

Parameters
keyBLOB key
subkeyBLOB identification subkey
access_timeoutTime in seconds. All objects older than this are deleted.

Implements ICache.

Definition at line 638 of file neticache_client.cpp.

References cmd, ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, NCBI_THROW, CNetICacheClient::RemoveBlob(), and ncbi::grid::netcache::search::fields::subkey.

◆ Purge() [3/3]

void CNetICacheClient::Purge ( time_t  access_timeout)
virtual

Delete all BLOBs older than specified.

Parameters
access_timeoutTime in seconds. All objects older than this are deleted.

Implements ICache.

Definition at line 632 of file neticache_client.cpp.

References kEmptyStr.

◆ PutData() [1/3]

string CNetCacheAPI::PutData ( const string key,
const void *  buf,
size_t  size,
const CNamedParameterList optional = NULL 
)

Update an existing BLOB.

Just like all other PutData methods, this one is blocking and waits for a confirmation from NetCache after all data is transferred.

Definition at line 614 of file netcache_api.cpp.

References buf, CNetCacheAPI::eCaching_Disable, eNetCache_Wait, kEmptyStr, ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), CNetCacheAPI::m_Impl, CNetCacheAPIParameters::SetCachingMode(), ncbi::grid::netcache::search::fields::size, and CNetCacheWriter::WriteBufferAndClose().

◆ PutData() [2/3]

string CNetCacheAPI::PutData ( const void *  buf,
size_t  size,
const CNamedParameterList optional = NULL 
)

Put BLOB to server.

This method is blocking and waits for a confirmation from NetCache after all data is transferred.

Parameters
bufData to be written.
sizeNumber of bytes to write.
optionalAn optional list of named blob creation parameters in the form of (param_name = param_value, ...).
See also
NetCacheClientParams
Returns
NetCache blob key

Definition at line 502 of file netcache_api.cpp.

References buf, kEmptyStr, and ncbi::grid::netcache::search::fields::size.

Referenced by CProjectStorage::Clone(), CGridCommandLineInterfaceApp::Cmd_PutBlob(), CBlobStorage_NetCache::CreateEmptyBlob(), CNetCacheAPI::CreateOStream(), CSampleNetCacheClient::DemoIWriterIReader(), CSampleNetCacheClient::DemoPartialRead(), CSampleNetCacheClient::DemoPutRead(), NAutomation::SNetCacheService::GetWriter(), CGridCommandLineInterfaceApp::NetCacheSanityCheck(), SWorkerNodeJobContextImpl::PutProgressMessage(), s_NetCacheWriterCreate(), CProjectStorage::SaveRawData(), SNetStorage_NetCacheBlob::StartWriting(), and CBlastHitMatrix::WriteToFile().

◆ PutData() [3/3]

IEmbeddedStreamWriter * CNetCacheAPI::PutData ( string key,
const CNamedParameterList optional = NULL 
)

Put BLOB to server.

This method is blocking, it waits for a confirmation from NetCache after all data is transferred. Since blob EOF marker is sent in the destructor, the blob will not be created until the stream is deleted.

Parameters
keyNetCache key, if empty new key is created
optionalAn optional list of named blob creation parameters in the form of (param_name = param_value, ...).
See also
NetCacheClientParams
Returns
IEmbeddedStreamWriter* (caller must delete it).

Definition at line 641 of file netcache_api.cpp.

References eNetCache_Wait, kEmptyStr, ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), and CNetCacheAPI::m_Impl.

◆ Read() [1/2]

bool CNetICacheClient::Read ( const string key,
int  version,
const string subkey,
void *  buf,
size_t  buf_size 
)
virtual
Warning
This method DOES NOT follow ICache::Read() interface on returning values/throwing exceptions.
Returns
FALSE if BLOB has not been fully read
Exceptions
Ifany error occurs (e.g. BLOB doesn't exist or expired).

Implements ICache.

Definition at line 486 of file neticache_client.cpp.

References buf, ncbi::grid::netcache::search::fields::key, CNetICacheClient::ReadPart(), ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CDataCrawlerCache::x_ReadState().

◆ Read() [2/2]

ERW_Result CNetCacheReader::Read ( void *  buf,
size_t  count,
size_t *  bytes_read = 0 
)
virtual

Read as many as "count" bytes into a buffer pointed to by the "buf" argument.

Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).

Note
Apparently, may not return eRW_Success if hasn't been able to read "count" bytes as requested, and "bytes_read" was provided as NULL.
When returning "*bytes_read" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_read" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer is read or the call returns when at least some data are available. In general, it is advised that this call is made within a loop that checks for EOF condition and proceeds with the reading until the required amount of data has been retrieved.

Implements IReader.

Definition at line 129 of file netcache_rw.cpp.

References SSocketAddress::AsString(), buf, eRW_Eof, eRW_Success, SNetServerInPool::m_Address, CNetCacheReader::m_BlobBytesToRead, CNetCacheReader::m_BlobID, CNetCacheReader::m_BlobSize, CNetCacheReader::m_CacheFile, CNetCacheReader::m_CachingEnabled, CNetCacheReader::m_Connection, SNetServerConnectionImpl::m_Server, SNetServerImpl::m_ServerInPool, NCBI_THROW_FMT, NULL, CFileIO::Read(), and CNetCacheReader::SocketRead().

◆ ReadData()

void CNetCacheAPI::ReadData ( const string key,
string buffer,
const CNamedParameterList optional = NULL 
)

Read the blob pointed to by "key" and store its contents in "buffer".

The output string is resized as required.

Exceptions
CNetCacheExceptionThrown if either the blob was not found or a protocol error occurred.
CNetServiceExceptionThrown if a communication error occurred.

Definition at line 780 of file netcache_api.cpp.

References buffer, ncbi::grid::netcache::search::fields::key, and CNetCacheAPI::ReadPart().

Referenced by CSampleNetCacheClient::DemoPutRead(), CBlobStorage_NetCache::GetBlobAsString(), and CGridClient::GetProgressMessage().

◆ ReadPart() [1/2]

bool CNetICacheClient::ReadPart ( const string key,
int  version,
const string subkey,
size_t  offset,
size_t  part_size,
void *  buf,
size_t  buf_size 
)

◆ ReadPart() [2/2]

void CNetCacheAPI::ReadPart ( const string key,
size_t  offset,
size_t  part_size,
string buffer,
const CNamedParameterList optional = NULL 
)

Read a part of the blob pointed to by "key" and store its contents in "buffer".

The output string is resized as required.

Exceptions
CNetCacheExceptionThrown if either the blob was not found or a protocol error occurred.
CNetServiceExceptionThrown if a communication error occurred.

Definition at line 786 of file netcache_api.cpp.

References buffer, CNetCacheAPI::GetPartReader(), ncbi::grid::netcache::search::fields::key, CNetCacheAPI::m_Impl, NULL, and offset.

Referenced by CSampleNetCacheClient::DemoPartialRead(), and CNetCacheAPI::ReadData().

◆ RegisterSession()

void CNetICacheClient::RegisterSession ( unsigned  pid)

Send session registration command.

Definition at line 331 of file neticache_client.cpp.

References NCBI_THROW.

◆ ReloadServerConfig()

void CNetCacheAdmin::ReloadServerConfig ( EReloadConfigOption  reload_option = eCompleteReload)

Reload configuration parameters from the same source.

Definition at line 69 of file netcache_api_admin.cpp.

References cmd, CNetCacheAdmin::eMirrorReload, and CNetCacheAdmin::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_Reconf().

◆ Remove() [1/2]

void CNetCacheAPI::Remove ( const string blob_id,
const CNamedParameterList optional = NULL 
)

◆ Remove() [2/2]

void CNetICacheClient::Remove ( const string key,
int  version,
const string subkey 
)
virtual

Remove specific cache entry.

Parameters
keyBLOB identification key
subkeyBLOB identification subkey
versionBLOB version

Implements ICache.

Definition at line 591 of file neticache_client.cpp.

References ncbi::grid::netcache::search::fields::key, CNetICacheClient::RemoveBlob(), ncbi::grid::netcache::search::fields::subkey, and version.

Referenced by CDataCrawlerCache::Remove(), and CDataCrawlerCache::SetState().

◆ RemoveBlob()

void CNetICacheClient::RemoveBlob ( const string key,
int  version,
const string subkey,
const CNamedParameterList optional = NULL 
)

◆ Reset()

void CBlobStorage_NetCache::Reset ( void  )
virtual

Close all streams and connections.

Implements IBlobStorage.

Definition at line 1097 of file netcache_api.cpp.

References CBlobStorage_NetCache::m_IStream, and CBlobStorage_NetCache::m_OStream.

Referenced by CCgiSession_NetCache::Reset(), and CBlobStorage_NetCache::~CBlobStorage_NetCache().

◆ ResetWriters()

void CNetCacheWriter::ResetWriters ( )
private

◆ SameCacheParams()

bool CNetICacheClient::SameCacheParams ( const TCacheParams params) const
virtual

Implements ICache.

Definition at line 937 of file neticache_client.cpp.

◆ Search()

vector< CNetICacheClient::CBlobInfo > CNetICacheClient::Search ( CNetICacheClient::CExpression  expression,
CNetICacheClient::CFields  filter = CFields() 
)

Returns information for all blobs matching provided search expression.

See also
NetCacheSearch for complete list of classes and operators.
Parameters
expressionSearch expression, e.g. 'created < hours(1) && size >= 1024'
fieldsAdditional output fields requested in blob info, e.g. 'expires | version_expires'
Returns
Blob info consisting of key, subkey, fields from provided search expression and output fields for all blobs matched the expression

Definition at line 947 of file neticache_client.cpp.

References CNetCacheAPIParameters::GetCacheName(), kEmptyStr, CNetICacheClient::m_Impl, output, NStr::PrintableString(), and result.

Referenced by CNetICacheClient::GetSubkeyList().

◆ SetActualBlobAgePtr()

void CNetCacheAPIParameters::SetActualBlobAgePtr ( unsigned *  actual_age_ptr)
inline

◆ SetBlobID()

void CNetCacheWriter::SetBlobID ( const string blob_id)
inline

Definition at line 143 of file netcache_rw.hpp.

References CNetCacheWriter::m_BlobID.

Referenced by SNetCacheAPIImpl::InitiateWriteCmd().

◆ SetBlobVersionAsCurrent()

void CNetICacheClient::SetBlobVersionAsCurrent ( const string key,
const string subkey,
int  version 
)
virtual

Set current valid version for a BLOB.

Parameters
[in]keyBLOB identification key
[in]subkeyBLOB identification subkey
[in]versionBLOB version which must be considered valid from now on
Note
Throw exception in case of transient errors.
There is an important special case: if the underlying storage is inherently incapable of storing BLOB version info without storing the BLOB itself, and there is currently no blob with the specified key/subkey/version present in the cache, then this function will just do nothing, and it will not throw exception.
See also
GetReadStream()

Implements ICache.

Definition at line 835 of file neticache_client.cpp.

References ERR_POST, ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, CNetServer::SExecResult::response, s_KeyVersionSubkeyToBlobID(), ncbi::grid::netcache::search::fields::subkey, and version.

◆ SetCacheName()

void CNetCacheAPIParameters::SetCacheName ( const string cache_name)
inline

◆ SetCachingMode()

void CNetCacheAPIParameters::SetCachingMode ( CNetCacheAPI::ECachingMode  caching_mode)
inline

◆ SetCommunicationTimeout() [1/2]

void CNetCacheAPI::SetCommunicationTimeout ( const STimeout to)
inline

◆ SetCommunicationTimeout() [2/2]

void CNetICacheClient::SetCommunicationTimeout ( const STimeout to)

Set communication timeout.

Definition at line 253 of file neticache_client.cpp.

References CNetICacheClient::m_Impl.

◆ SetCompoundIDPool()

void CNetCacheAPI::SetCompoundIDPool ( CCompoundIDPool::TInstance  compound_id_pool)

Definition at line 937 of file netcache_api.cpp.

References CNetCacheAPI::m_Impl.

Referenced by SNetStorageRPC::x_InitNetCacheAPI().

◆ SetDefaultParameters()

void CNetCacheAPI::SetDefaultParameters ( const CNamedParameterList parameters)

Override defaults used by this object.

Parameters
parametersA list of named parameters, for example: SetDefaultParameters(use_compound_id = true);
Warning
This method is not thread-safe (it cannot be called concurrently from multiple threads on the same object).

Definition at line 497 of file netcache_api.cpp.

References CNetCacheAPI::m_Impl.

Referenced by CGridCommandLineInterfaceApp::SetUp_NetCacheCmd(), and SNetStorageRPC::x_InitNetCacheAPI().

◆ SetFlag()

void CNetCacheKey::SetFlag ( ENCKeyFlag  flag)
inline

Definition at line 102 of file netcache_key.hpp.

References CNetCacheKey::m_Flags.

Referenced by CNetCacheKey::ParseBlobKey().

◆ SetFlags()

void CNetICacheClient::SetFlags ( TFlags  flags)
virtual

◆ SetMaxBlobAge()

void CNetCacheAPIParameters::SetMaxBlobAge ( unsigned  max_age)
inline

◆ SetMirroringMode() [1/2]

void CNetCacheAPIParameters::SetMirroringMode ( CNetCacheAPI::EMirroringMode  mirroring_mode)
inline

◆ SetMirroringMode() [2/2]

void CNetCacheAPIParameters::SetMirroringMode ( const string mirroring_mode)

◆ SetPassword()

void CNetCacheAPIParameters::SetPassword ( const string password)

◆ SetServerCheck() [1/2]

void CNetCacheAPIParameters::SetServerCheck ( const string server_check)

◆ SetServerCheck() [2/2]

void CNetCacheAPIParameters::SetServerCheck ( ESwitch  server_check)
inline

◆ SetServerCheckHint() [1/2]

void CNetCacheAPIParameters::SetServerCheckHint ( bool  server_check_hint)
inline

◆ SetServerCheckHint() [2/2]

void CNetCacheAPIParameters::SetServerCheckHint ( const string server_check_hint)

◆ SetServerLastUsedPtr()

void CNetCacheAPIParameters::SetServerLastUsedPtr ( CNetServer server_last_used_ptr)
inline

◆ SetServerToUse()

void CNetCacheAPIParameters::SetServerToUse ( CNetServer::TInstance  server_to_use)
inline

◆ SetTimeStampPolicy()

void CNetICacheClient::SetTimeStampPolicy ( TTimeStampFlags  policy,
unsigned int  timeout,
unsigned int  max_timeout = 0 
)
virtual

Set timestamp update policy.

Parameters
policyA bitwise combination of "ETimeStampFlags".
timeoutDefault expiration timeout for the stored BLOBs.
max_timeoutMaximum value for individually set BLOB timeouts. If "max_timeout" < "timeout", then it 'll be set to "timeout".

Implements ICache.

Definition at line 355 of file neticache_client.cpp.

References NCBI_THROW.

◆ SetTryAllServers()

void CNetCacheAPIParameters::SetTryAllServers ( bool  try_all_servers)
inline

◆ SetTTL()

void CNetCacheAPIParameters::SetTTL ( unsigned  blob_ttl)

◆ SetUseCompoundID()

void CNetCacheAPIParameters::SetUseCompoundID ( bool  use_compound_id)
inline

◆ SetVersionRetention()

void CNetICacheClient::SetVersionRetention ( EKeepVersions  policy)
virtual

Set version retention policy.

Parameters
policyVersion retention mode

Implements ICache.

Definition at line 379 of file neticache_client.cpp.

References NCBI_THROW.

◆ ShutdownServer()

void CNetCacheAdmin::ShutdownServer ( EShutdownOption  shutdown_option = eNormalShutdown)

Shutdown the server daemon.

Note
Protected to avoid a temptation to call it from time to time. :)

Definition at line 55 of file netcache_api_admin.cpp.

References cmd, CNetCacheAdmin::eDrain, CDiagContext::GetRequestContext(), and CNetCacheAdmin::m_Impl.

Referenced by CGridCommandLineInterfaceApp::Cmd_Shutdown().

◆ SocketRead()

void CNetCacheReader::SocketRead ( void *  buf,
size_t  count,
size_t *  bytes_read 
)
private

◆ Store()

void CNetICacheClient::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 
)
virtual

Add or replace BLOB.

Parameters
keyBLOB identification key
keyBLOB identification sub-key
versionBLOB version
datapointer on data buffer
sizedata buffer size in bytes (chars)
time_to_liveIndividual timeout. Cannot exceed max timeout.

Implements ICache.

Definition at line 391 of file neticache_client.cpp.

References data, CNetCacheAPI::eCaching_Disable, eICache_NoWait, eNetCache_Wait, ICache::fBestReliability, ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, s_KeyVersionSubkeyToBlobID(), CNetCacheAPIParameters::SetCachingMode(), CNetCacheAPIParameters::SetTTL(), ncbi::grid::netcache::search::fields::size, ncbi::grid::netcache::search::fields::subkey, version, and CNetCacheWriter::WriteBufferAndClose().

Referenced by CDataCrawlerCache::x_WriteState().

◆ StringToBool()

bool CNetCacheAPIParameters::StringToBool ( const string bool_str,
bool  default_value = false 
)
static

◆ StripKeyExtensions()

string CNetCacheKey::StripKeyExtensions ( ) const
inline

If the blob key has been parsed successfully, this method returns a trimmed "base" version of the key with "0MetA0" extensions removed.

Definition at line 168 of file netcache_key.hpp.

References CNetCacheKey::m_PrimaryKey.

Referenced by CNCBlobKey::Assign(), and CNetCacheAPI::ProlongBlobLifetime().

◆ Transmit()

void CNetCacheWriter::Transmit ( const void *  buf,
size_t  count,
size_t *  bytes_written 
)
private

◆ TransmitImpl()

EIO_Status CNetCacheWriter::TransmitImpl ( const char *  buf,
size_t  count 
)
private

◆ UnRegisterSession()

void CNetICacheClient::UnRegisterSession ( unsigned  pid)

Send session unregistration command.

Definition at line 337 of file neticache_client.cpp.

References NCBI_THROW.

◆ UploadCacheFile()

void CNetCacheWriter::UploadCacheFile ( )
private

◆ Write()

ERW_Result CNetCacheWriter::Write ( const void *  buf,
size_t  count,
size_t *  bytes_written = 0 
)
virtual

Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device.

Always store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" must be ignored in this case), via the "bytes_written" pointer, if provided non-NULL. Note that the method can return non-eRW_Success in case of an I/O error along with indicating (some) data delivered to the output device (and reflected in "*bytes_written").

Note
Apparently, may not return eRW_Success if hasn't been able to write "count" bytes as requested, and "bytes_written" was passed as NULL.
When returning "*bytes_written" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_written" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer or only some data has been written out. In general, it is advised that this call is made within a loop that checks for errors and proceeds with the writing until the required amount of data has been sent.

Implements IWriter.

Definition at line 264 of file netcache_rw.cpp.

References buf, eRW_Error, eRW_Success, CNetCacheWriter::IsConnectionOpen(), CNetCacheWriter::m_CacheFile, CNetCacheWriter::m_CachingEnabled, NULL, CNetCacheWriter::Transmit(), and CFileIO::Write().

Referenced by CNetCacheWriter::WriteBufferAndClose().

◆ WriteBufferAndClose()

void CNetCacheWriter::WriteBufferAndClose ( const char *  buf_ptr,
size_t  buf_size 
)

◆ ~CBlobStorage_NetCache()

CBlobStorage_NetCache::~CBlobStorage_NetCache ( )
virtual

Definition at line 1052 of file netcache_api.cpp.

References NCBI_CATCH_ALL, and CBlobStorage_NetCache::Reset().

◆ ~CNetCacheReader()

CNetCacheReader::~CNetCacheReader ( )
virtual

Definition at line 122 of file netcache_rw.cpp.

References CNetCacheReader::Close(), and NCBI_CATCH_ALL_X.

◆ ~CNetCacheWriter()

CNetCacheWriter::~CNetCacheWriter ( )
virtual

Definition at line 257 of file netcache_rw.cpp.

References CNetCacheWriter::Close(), and NCBI_CATCH_ALL_X.

Variable Documentation

◆ kNetCacheAPIDriverName

const char* const kNetCacheAPIDriverName
extern

◆ kNetICacheDriverName

const char* const kNetICacheDriverName
extern

Definition at line 65 of file neticache_client.cpp.

Referenced by SNetICacheClientImpl::SNetICacheClientImpl().

◆ m_ActualBlobAgePtr

unsigned* CNetCacheAPIParameters::m_ActualBlobAgePtr
private

Definition at line 202 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetActualBlobAgePtr().

◆ m_BlobBytesToRead

Uint8 CNetCacheReader::m_BlobBytesToRead
private

◆ m_BlobID [1/2]

string CNetCacheReader::m_BlobID
private

◆ m_BlobID [2/2]

string CNetCacheWriter::m_BlobID
private

◆ m_BlobSize

Uint8 CNetCacheReader::m_BlobSize
private

◆ m_CacheFile [1/2]

CFileIO CNetCacheReader::m_CacheFile
private

◆ m_CacheFile [2/2]

CFileIO CNetCacheWriter::m_CacheFile
private

◆ m_CacheName

string CNetCacheAPIParameters::m_CacheName
private

Definition at line 205 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetCacheName().

◆ m_CachingEnabled [1/2]

bool CNetCacheReader::m_CachingEnabled
private

◆ m_CachingEnabled [2/2]

bool CNetCacheWriter::m_CachingEnabled
private

◆ m_CachingMode

CNetCacheAPI::ECachingMode CNetCacheAPIParameters::m_CachingMode
private

Definition at line 194 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetCachingMode().

◆ m_Connection [1/2]

CNetServerConnection CNetCacheReader::m_Connection
private

◆ m_Connection [2/2]

CNetServerConnection CNetCacheWriter::m_Connection
private

◆ m_CreationTime

time_t CNetCacheKey::m_CreationTime
private

Definition at line 155 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetCreationTime(), and CNetCacheKey::ParseBlobKey().

◆ m_Defaults

const CNetCacheAPIParameters* CNetCacheAPIParameters::m_Defaults
private

Definition at line 191 of file netcache_params.hpp.

◆ m_DefinedParameters

TDefinedParameters CNetCacheAPIParameters::m_DefinedParameters
private

◆ m_Flags

TNCKeyFlags CNetCacheKey::m_Flags
private

◆ m_Host

string CNetCacheKey::m_Host
private

server name

Definition at line 151 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetHost(), and CNetCacheKey::ParseBlobKey().

◆ m_HostPortCRC32

unsigned CNetCacheKey::m_HostPortCRC32
private

CRC32 checksum of the host:port combination.

Definition at line 153 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetHostPortCRC32(), and CNetCacheKey::ParseBlobKey().

◆ m_Id

unsigned int CNetCacheKey::m_Id
private

BLOB id.

Definition at line 150 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetId(), and CNetCacheKey::ParseBlobKey().

◆ m_Impl [1/3]

CNetRef< SNetCacheAdminImpl > CNetCacheAdmin::m_Impl
protected

◆ m_Impl [2/3]

CNetRef< SNetCacheAPIImpl > CNetCacheAPI::m_Impl
protected

◆ m_Impl [3/3]

CNetRef< SNetICacheClientImpl > CNetICacheClient::m_Impl
protected

◆ m_IStream

unique_ptr<CNcbiIstream> CBlobStorage_NetCache::m_IStream
private

◆ m_Key [1/2]

string CNetCacheKey::m_Key
private

◆ m_Key [2/2]

string CNetCacheWriter::m_Key
private

Definition at line 162 of file netcache_rw.hpp.

Referenced by CNetCacheWriter::GetKey().

◆ m_MaxBlobAge

unsigned CNetCacheAPIParameters::m_MaxBlobAge
private

Definition at line 201 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetMaxBlobAge().

◆ m_MirroringMode

CNetCacheAPI::EMirroringMode CNetCacheAPIParameters::m_MirroringMode
private

Definition at line 195 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetMirroringMode().

◆ m_NCClient

CNetCacheAPI CBlobStorage_NetCache::m_NCClient
private

◆ m_NetCacheAPI

CNetCacheAPI CNetCacheWriter::m_NetCacheAPI
private

◆ m_OStream

unique_ptr<CNcbiOstream> CBlobStorage_NetCache::m_OStream
private

◆ m_Parameters

const CNetCacheAPIParameters* CNetCacheWriter::m_Parameters
private

Definition at line 163 of file netcache_rw.hpp.

Referenced by CNetCacheWriter::EstablishConnection().

◆ m_Password

std::string CNetCacheAPIParameters::m_Password
private

Definition at line 198 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetPassword().

◆ m_Port

unsigned short CNetCacheKey::m_Port
private

TCP/IP port number.

Definition at line 152 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetPort(), and CNetCacheKey::ParseBlobKey().

◆ m_PrimaryKey

string CNetCacheKey::m_PrimaryKey
private

◆ m_Random

Uint4 CNetCacheKey::m_Random
private

Definition at line 156 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetRandomPart(), and CNetCacheKey::ParseBlobKey().

◆ m_ResponseType

ENetCacheResponseType CNetCacheWriter::m_ResponseType
private

Definition at line 158 of file netcache_rw.hpp.

Referenced by CNetCacheWriter::Close(), and CNetCacheWriter::GetResponseType().

◆ m_ServerCheck

ESwitch CNetCacheAPIParameters::m_ServerCheck
private

Definition at line 196 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetServerCheck().

◆ m_ServerCheckHint

bool CNetCacheAPIParameters::m_ServerCheckHint
private

Definition at line 197 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetServerCheckHint().

◆ m_ServerLastUsedPtr

CNetServer* CNetCacheAPIParameters::m_ServerLastUsedPtr
private

Definition at line 200 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetServerLastUsedPtr().

◆ m_ServerToUse

CNetServer CNetCacheAPIParameters::m_ServerToUse
private

Definition at line 199 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetServerToUse().

◆ m_ServiceName

string CNetCacheKey::m_ServiceName
private

Definition at line 159 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetServiceName(), and CNetCacheKey::ParseBlobKey().

◆ m_SocketReaderWriter

unique_ptr<CSocketReaderWriter> CNetCacheWriter::m_SocketReaderWriter
private

◆ m_TransmissionWriter

unique_ptr<CTransmissionWriter> CNetCacheWriter::m_TransmissionWriter
private

◆ m_TryAllServers

bool CNetCacheAPIParameters::m_TryAllServers
private

Definition at line 204 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetTryAllServers().

◆ m_TTL

unsigned CNetCacheAPIParameters::m_TTL
private

Definition at line 193 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetTTL().

◆ m_UseCompoundID

bool CNetCacheAPIParameters::m_UseCompoundID
private

Definition at line 203 of file netcache_params.hpp.

Referenced by CNetCacheAPIParameters::SetUseCompoundID().

◆ m_Version

unsigned CNetCacheKey::m_Version
private

Key version.

Definition at line 154 of file netcache_key.hpp.

Referenced by CNetCacheKey::GetVersion(), and CNetCacheKey::ParseBlobKey().

Modified on Sat Jun 22 10:43:33 2024 by modify_doxy.py rev. 669887