A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__NetCacheClient.html below:

Client API to NCBI NetCache

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   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 }     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 ()   ◆ CBlobInfo ◆ CExpression ◆ CFields ◆ 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 ◆ TDefinedParameters ◆ TInstance [1/3] ◆ TInstance [2/3] ◆ TInstance [3/3] ◆ 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 ◆ TNCKeyFlags ◆ TParent [1/2] ◆ TParent [2/2] ◆ 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.

◆ EAppRegistry [1/2] ◆ EAppRegistry [2/2] ◆ 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] ◆ 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 ◆ 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.

◆ Abort() void CNetCacheWriter::Abort ( void  ) virtual ◆ AbortConnection() void CNetCacheWriter::AbortConnection ( ) private

Definition at line 379 of file netcache_rw.cpp.

References SNetServerConnectionImpl::Abort(), CTransmissionWriter::eDontSendEofPacket, eIO_Open, CSocket::GetStatus(), CNetCacheWriter::m_Connection, SNetServerConnectionImpl::m_Socket, CNetCacheWriter::m_TransmissionWriter, NULL, and CNetCacheWriter::ResetWriters().

Referenced by CNetCacheWriter::Abort(), CNetCacheWriter::Close(), and CNetCacheWriter::Transmit().

◆ AddExtensions() ◆ Assign() ◆ Cache_RegisterDriver_NetCache() void Cache_RegisterDriver_NetCache ( void  ) ◆ CalculateChecksum() Uint4 CNetCacheKey::CalculateChecksum ( const stringhost, unsigned short  port  ) static ◆ CBlobStorage_NetCache() [1/3] CBlobStorage_NetCache::CBlobStorage_NetCache ( ) ◆ CBlobStorage_NetCache() [2/3] ◆ CBlobStorage_NetCache() [3/3] ◆ CheckBlobSize() size_t CheckBlobSize ( Uint8  blob_size ) inline ◆ ClearFlag() ◆ Close() [1/2] void CNetCacheReader::Close ( void  ) virtual ◆ Close() [2/2] void CNetCacheWriter::Close ( void  ) virtual

Implements IEmbeddedStreamWriter.

Definition at line 288 of file netcache_rw.cpp.

References CNetCacheWriter::AbortConnection(), CONNSERV_THROW_FMT, dummy, eNetCache_Wait, eRW_Success, eRW_Timeout, CNetCacheWriter::EstablishConnection(), CFileIO::Flush(), CNetCacheWriter::IsConnectionOpen(), CNetCacheWriter::m_CacheFile, CNetCacheWriter::m_CachingEnabled, CNetCacheWriter::m_Connection, CNetCacheWriter::m_ResponseType, SNetServerConnectionImpl::m_Server, SNetServerConnectionImpl::m_Socket, CNetCacheWriter::m_TransmissionWriter, NULL, SNetServerConnectionImpl::ReadCmdOutputLine(), CNetCacheWriter::ResetWriters(), CSocket::SetCork(), and CNetCacheWriter::UploadCacheFile().

Referenced by CNetCacheWriter::WriteBufferAndClose(), and CNetCacheWriter::~CNetCacheWriter().

◆ CNetCacheAdmin() [1/3] ◆ CNetCacheAdmin() [2/3] ◆ CNetCacheAdmin() [3/3] ◆ CNetCacheAPI() [1/8] ◆ CNetCacheAPI() [2/8]

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

Parameters
conf A CConfig object to get the configuration parameters from. conf_section Name 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]

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

Parameters
reg Registry to get the configuration parameters from. conf_section Name 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() [5/8]

Construct client, working with the specified service.

Definition at line 490 of file netcache_api.cpp.

◆ CNetCacheAPI() [6/8]

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

Parameters
use_app_reg Selects this constructor. The parameter is not used otherwise. conf_section Name 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() [8/8] ◆ CNetCacheAPIParameters() [1/2] ◆ CNetCacheAPIParameters() [2/2] ◆ CNetCacheKey() [1/2] CNetCacheKey::CNetCacheKey ( ) inline ◆ CNetCacheKey() [2/2] ◆ CNetCacheReader()

Definition at line 58 of file netcache_rw.cpp.

References SNetServerConnectionImpl::Abort(), buf, CACHE_XFER_BUFFER_SIZE, CheckBlobSize(), CNetServer::SExecResult::conn, CONNSERV_THROW_FMT, CFileIO::CreateTemporary(), CNetCacheAPI::eCaching_AppDefault, CNetCacheAPI::eCaching_Disable, NStr::fAllowTrailingSymbols, CFileIO::Flush(), CNetCacheAPIParameters::GetCachingMode(), CFileIO::GetFilePos(), CNetCacheReader::m_BlobBytesToRead, CNetCacheReader::m_BlobSize, CNetCacheReader::m_CacheFile, CNetCacheReader::m_CachingEnabled, CNetCacheReader::m_Connection, SNetServerConnectionImpl::m_Server, NCBI_THROW, NULL, CNetServer::SExecResult::response, s_InputBlobCachePrefix, CFileIO::SetFilePos(), CNetCacheReader::SocketRead(), NStr::StringToUInt8(), and CFileIO::Write().

◆ CNetCacheWriter() ◆ CNetICacheClient() [1/7] ◆ CNetICacheClient() [2/7] ◆ CNetICacheClient() [3/7] ◆ CNetICacheClient() [4/7] ◆ CNetICacheClient() [5/7]

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

Parameters
use_app_reg Selects this constructor. The parameter is not used otherwise. conf_section Name 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() [7/7] ◆ CreateEmptyBlob() string CBlobStorage_NetCache::CreateEmptyBlob ( ) virtual ◆ CreateOStream() [1/2] ◆ CreateOStream() [2/2] ◆ DeleteBlob() void CBlobStorage_NetCache::DeleteBlob ( const stringdata_id ) virtual ◆ Eof() bool CNetCacheReader::Eof ( void  ) const inline ◆ EstablishConnection() void CNetCacheWriter::EstablishConnection ( ) private

Definition at line 511 of file netcache_rw.cpp.

References eIO_WritePlain, eNoOwnership, CTransmissionWriter::eSendEofPacket, SNetCacheAPIImpl::InitiateWriteCmd(), CNetCacheWriter::m_Connection, CNetCacheWriter::m_NetCacheAPI, CNetCacheWriter::m_Parameters, SNetServerConnectionImpl::m_Socket, CNetCacheWriter::m_SocketReaderWriter, CNetCacheWriter::m_TransmissionWriter, CNetCacheWriter::ResetWriters(), and CSocket::SetCork().

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

◆ Flush() ◆ GenerateBlobKey() void CNetCacheKey::GenerateBlobKey ( stringkey, unsigned int  id, const stringhost, 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()

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
key BLOB identification key subkey BLOB identification subkey version BLOB 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() ◆ GetAge() unsigned CNetCacheBlobTooOldException::GetAge ( ) const inline ◆ GetBlobAccess()

Get BLOB access using BlobAccessDescr.

Method fills blob_descr parameter. If provided buffer has sufficient capacity for BLOB storage, BLOB is saved into the buffer, otherwise IReader is created.

Note
Method supposed to provide fast access to relatively small BLOBs

Implements ICache.

Definition at line 517 of file neticache_client.cpp.

References ICache::SBlobAccessDescr::actual_age, ICache::SBlobAccessDescr::blob_found, ICache::SBlobAccessDescr::blob_size, ICache::SBlobAccessDescr::buf, ICache::SBlobAccessDescr::buf_size, ICache::SBlobAccessDescr::current_version, ICache::SBlobAccessDescr::current_version_validity, CNetCacheAPI::eCaching_AppDefault, ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, ICache::SBlobAccessDescr::maximum_age, nc_actual_age, nc_caching_mode, nc_max_age, NULL, SNetCacheAPIImpl::ReadBuffer(), ICache::SBlobAccessDescr::reader, ICache::SBlobAccessDescr::return_current_version, ICache::SBlobAccessDescr::return_current_version_supported, ncbi::grid::netcache::search::fields::subkey, and dtl::version.

◆ GetBlobAsString() ◆ GetBlobID() [1/2] ◆ GetBlobID() [2/2] ◆ GetBlobId() ◆ GetBlobInfo() [1/2] ◆ GetBlobInfo() [2/2] ◆ GetBlobOwner() ◆ GetBlobSize() [1/3] Uint8 CNetCacheReader::GetBlobSize ( ) const inline ◆ GetBlobSize() [2/3] ◆ GetBlobSize() [3/3]

Returns the size of the BLOB identified by the "key", "version", and "subkey" parameters.

Note
This updates the blob's expiration time.

Definition at line 421 of file neticache_client.cpp.

References CheckBlobSize(), ncbi::grid::netcache::search::fields::key, CNetCacheAPIParameters::LoadNamedParameters(), CNetICacheClient::m_Impl, NStr::StringToUInt8(), ncbi::grid::netcache::search::fields::subkey, and dtl::version.

Referenced by CGridCommandLineInterfaceApp::Cmd_BlobInfo(), NDirectNetStorageImpl::CNetCache::GetSize(), and CNetICacheClient::GetSize().

◆ GetCacheName() [1/2] string CNetCacheAPIParameters::GetCacheName ( void  ) const ◆ GetCacheName() [2/2] string CNetICacheClient::GetCacheName ( void  ) const virtual ◆ GetCachingMode() ◆ GetCommunicationTimeout() STimeout CNetICacheClient::GetCommunicationTimeout ( ) const ◆ GetCompoundIDPool() ◆ GetCreationTime() time_t CNetCacheKey::GetCreationTime ( ) const inline ◆ GetData() [1/3] ◆ GetData() [2/3]

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
key BLOB key to read (returned by PutData) blob_size Pointer to the memory location where the size of the requested blob will be stored. optional An 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] ◆ GetErrCodeString() [1/2] virtual const char* CNetCacheException::GetErrCodeString ( void  ) const inlineoverridevirtual ◆ GetErrCodeString() [2/2] virtual const char* CNetCacheBlobTooOldException::GetErrCodeString ( void  ) const inlineoverridevirtual ◆ GetFlag() ◆ GetFlags() [1/2] ◆ GetFlags() [2/2] ◆ GetHost() ◆ GetHostPortCRC32() unsigned CNetCacheKey::GetHostPortCRC32 ( ) const inline ◆ GetId() unsigned int CNetCacheKey::GetId ( void  ) const inline ◆ GetIStream() [1/2] ◆ GetIStream() [2/2] ◆ GetKey() [1/2] ◆ GetKey() [2/2] ◆ GetMaxBlobAge() unsigned CNetCacheAPIParameters::GetMaxBlobAge ( ) const ◆ GetMirroringMode() ◆ GetNetCacheAPI() CNetCacheAPI CBlobStorage_NetCache::GetNetCacheAPI ( ) const inline ◆ GetNetCacheWriter()

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
key ICache key version ICache key version subkey ICache subkey time_to_live BLOB time to live value in seconds. 0 - server side default is assumed. caching_mode Defines 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 dtl::version.

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

◆ GetPartReader() ◆ GetPassword() std::string CNetCacheAPIParameters::GetPassword ( void  ) const ◆ GetPort() unsigned short CNetCacheKey::GetPort ( void  ) const inline ◆ GetRandomPart() Uint4 CNetCacheKey::GetRandomPart ( ) const inline ◆ GetReader()

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);

total_bytes_read += bytes_read;

buf_ptr += bytes_read;

buf_size -= bytes_read;

break;

} else {

"Error while reading BLOB");

}

}

return total_bytes_read;

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

#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] ◆ GetReadStream() [2/3] ◆ GetReadStream() [3/3] ◆ GetReadStreamPart() ◆ GetResponseType() ◆ GetServerCheck() bool CNetCacheAPIParameters::GetServerCheck ( ESwitchserver_check ) const ◆ GetServerCheckHint() bool CNetCacheAPIParameters::GetServerCheckHint ( boolserver_check_hint ) const ◆ GetServerLastUsedPtr() CNetServer * CNetCacheAPIParameters::GetServerLastUsedPtr ( ) const ◆ GetServerToUse() CNetServer CNetCacheAPIParameters::GetServerToUse ( ) const ◆ GetServerVersion() void CNetCacheAdmin::GetServerVersion ( CNcbiOstreamoutput_stream ) ◆ GetService() [1/2] ◆ GetService() [2/2] ◆ GetServiceName() ◆ GetSize() ◆ GetSubkeyList() ◆ GetTimeout() int CNetICacheClient::GetTimeout ( ) const virtual ◆ GetTimeStampPolicy() ◆ GetTryAllServers() bool CNetCacheAPIParameters::GetTryAllServers ( ) const ◆ GetTTL() unsigned CNetCacheAPIParameters::GetTTL ( void  ) const ◆ GetUseCompoundID() bool CNetCacheAPIParameters::GetUseCompoundID ( ) const ◆ GetVersion() [1/2] int CNetCacheBlobTooOldException::GetVersion ( void  ) const inline ◆ GetVersion() [2/2] unsigned int CNetCacheKey::GetVersion ( void  ) const inline ◆ GetVersionRetention() ◆ GetWriteStream() ◆ HasBlob() [1/2] ◆ HasBlob() [2/2] ◆ HasBlobs() ◆ HasExtensions() bool CNetCacheKey::HasExtensions ( ) const inline ◆ IsConnectionOpen() bool CNetCacheWriter::IsConnectionOpen ( ) inlineprivate ◆ IsKeyValid() ◆ IsOpen() bool CNetICacheClient::IsOpen ( ) const virtual ◆ IsValidKey() [1/2] ◆ IsValidKey() [2/2] ◆ KeyToCompoundID()

Definition at line 377 of file netcache_key.cpp.

References CCompoundID::AppendFlags(), CCompoundID::AppendHost(), CCompoundID::AppendID(), CCompoundID::AppendIPv4SockAddr(), CCompoundID::AppendPort(), CCompoundID::AppendRandom(), CCompoundID::AppendServiceName(), CCompoundID::AppendTimestamp(), eCIC_NetCacheBlobKey, CNetCacheKey::GetCreationTime(), CNetCacheKey::GetFlags(), CNetCacheKey::GetHost(), CSocketAPI::gethostbyname(), CNetCacheKey::GetId(), CNetCacheKey::GetPort(), CNetCacheKey::GetRandomPart(), CNetCacheKey::GetServiceName(), CSocketAPI::isip(), CCompoundIDPool::NewID(), and CCompoundID::ToString().

Referenced by SNetCacheAPIImpl::InitiateWriteCmd().

◆ LoadNamedParameters()

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"  , 1  , 1  , 0    ) ◆ NCBI_EntryPoint_xcache_netcache() ◆ NCBI_EntryPoint_xnetcacheapi() ◆ NCBI_EXCEPTION_DEFAULT() [1/2] ◆ NCBI_EXCEPTION_DEFAULT() [2/2] ◆ operator const SNetCacheAdminImpl *() ◆ operator const SNetCacheAPIImpl *() ◆ operator const SNetICacheClientImpl *() ◆ operator SNetCacheAdminImpl *() ◆ operator SNetCacheAPIImpl *() ◆ operator SNetICacheClientImpl *() ◆ operator--() [1/6] ◆ operator--() [2/6] ◆ operator--() [3/6] ◆ operator--() [4/6] ◆ operator--() [5/6] ◆ operator--() [6/6] ◆ operator->() [1/6] ◆ operator->() [2/6] ◆ operator->() [3/6] ◆ operator->() [4/6] ◆ operator->() [5/6] ◆ operator->() [6/6] ◆ operator=() [1/4] ◆ operator=() [2/4] ◆ operator=() [3/4] ◆ operator=() [4/4] ◆ ParseBlobKey()

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 count, eRW_Success, CNetCacheReader::m_BlobBytesToRead, CNetCacheReader::m_CachingEnabled, CNetCacheReader::m_Connection, SNetServerConnectionImpl::m_Socket, MAX_PENDING_COUNT, and CSocketReaderWriter::PendingCount().

◆ PrintBlobInfo() [1/2] ◆ PrintBlobInfo() [2/2] ◆ PrintConfig() void CNetCacheAdmin::PrintConfig ( CNcbiOstreamoutput_stream ) ◆ PrintHealth() void CNetCacheAdmin::PrintHealth ( CNcbiOstreamoutput_stream ) ◆ PrintStat() ◆ ProlongBlobLifetime() ◆ Purge() [1/3] void CNetCacheAdmin::Purge ( const stringcache_name ) ◆ Purge() [2/3] ◆ Purge() [3/3] void CNetICacheClient::Purge ( time_t  access_timeout ) virtual

Delete all BLOBs older than specified.

Parameters
access_timeout Time 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]

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]

Put BLOB to server.

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

Parameters
buf Data to be written. size Number of bytes to write. optional An 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] ◆ Read() [1/2] ◆ 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, count, 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() ◆ ReadPart() [1/2] bool CNetICacheClient::ReadPart ( const stringkey, int  version, const stringsubkey, size_t  offset, size_t  part_size, void *  buf, size_t  buf_size  )

Definition at line 495 of file neticache_client.cpp.

References buf, CNetCacheAPI::eCaching_Disable, CNetCacheAPI::eReadComplete, ncbi::grid::netcache::search::fields::key, CNetICacheClient::m_Impl, nc_caching_mode, NULL, offset, SNetCacheAPIImpl::ReadBuffer(), ncbi::grid::netcache::search::fields::subkey, and dtl::version.

Referenced by CNetICacheClient::Read().

◆ ReadPart() [2/2] ◆ RegisterSession() void CNetICacheClient::RegisterSession ( unsigned  pid ) ◆ ReloadServerConfig() ◆ Remove() [1/2] ◆ Remove() [2/2] ◆ RemoveBlob() ◆ Reset() void CBlobStorage_NetCache::Reset ( void  ) virtual ◆ ResetWriters() void CNetCacheWriter::ResetWriters ( ) private ◆ SameCacheParams() ◆ Search() ◆ SetActualBlobAgePtr() void CNetCacheAPIParameters::SetActualBlobAgePtr ( unsigned *  actual_age_ptr ) inline ◆ SetBlobID() void CNetCacheWriter::SetBlobID ( const stringblob_id ) inline ◆ SetBlobVersionAsCurrent() ◆ SetCacheName() void CNetCacheAPIParameters::SetCacheName ( const stringcache_name ) inline ◆ SetCachingMode() ◆ SetCommunicationTimeout() [1/2] void CNetCacheAPI::SetCommunicationTimeout ( const STimeoutto ) inline ◆ SetCommunicationTimeout() [2/2] void CNetICacheClient::SetCommunicationTimeout ( const STimeoutto ) ◆ SetCompoundIDPool() ◆ SetDefaultParameters() ◆ SetFlag() ◆ SetFlags() void CNetICacheClient::SetFlags ( TFlags  flags ) virtual ◆ SetMaxBlobAge() void CNetCacheAPIParameters::SetMaxBlobAge ( unsigned  max_age ) inline ◆ SetMirroringMode() [1/2] ◆ SetMirroringMode() [2/2] void CNetCacheAPIParameters::SetMirroringMode ( const stringmirroring_mode ) ◆ SetPassword() void CNetCacheAPIParameters::SetPassword ( const stringpassword ) ◆ SetServerCheck() [1/2] void CNetCacheAPIParameters::SetServerCheck ( const stringserver_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 stringserver_check_hint ) ◆ SetServerLastUsedPtr() void CNetCacheAPIParameters::SetServerLastUsedPtr ( CNetServerserver_last_used_ptr ) inline ◆ SetServerToUse() ◆ SetTimeStampPolicy() void CNetICacheClient::SetTimeStampPolicy ( TTimeStampFlags  policy, unsigned int  timeout, unsigned int  max_timeout = 0  ) virtual

Set timestamp update policy.

Parameters
policy A bitwise combination of "ETimeStampFlags". timeout Default expiration timeout for the stored BLOBs. max_timeout Maximum 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 ◆ ShutdownServer() ◆ SocketRead() void CNetCacheReader::SocketRead ( void *  buf, size_t  count, size_t *  bytes_read  ) private

Definition at line 185 of file netcache_rw.cpp.

References buf, CONNSERV_THROW_FMT, count, eIO_Success, eIO_Timeout, CSocket::GetOSHandle(), IO_StatusStr(), CNetCacheReader::m_BlobBytesToRead, CNetCacheReader::m_BlobID, CNetCacheReader::m_BlobSize, CNetCacheReader::m_Connection, SNetServerConnectionImpl::m_Server, SNetServerConnectionImpl::m_Socket, CSocket::Read(), and val.

Referenced by CNetCacheReader::CNetCacheReader(), and CNetCacheReader::Read().

◆ Store()

Add or replace BLOB.

Parameters
key BLOB identification key key BLOB identification sub-key version BLOB version data pointer on data buffer size data buffer size in bytes (chars) time_to_live Individual 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, dtl::version, and CNetCacheWriter::WriteBufferAndClose().

Referenced by CDataCrawlerCache::x_WriteState().

◆ StringToBool() ◆ StripKeyExtensions() string CNetCacheKey::StripKeyExtensions ( ) const inline ◆ Transmit() void CNetCacheWriter::Transmit ( const void *  buf, size_t  count, size_t *  bytes_written  ) private

Definition at line 474 of file netcache_rw.cpp.

References _TROUBLE, CNetCacheWriter::AbortConnection(), buf, CONNSERV_THROW_FMT, count, eIO_InvalidArg, eIO_NotSupported, eIO_Timeout, eIO_Unknown, CNetCacheWriter::m_Connection, SNetServerConnectionImpl::m_Server, and CNetCacheWriter::TransmitImpl().

Referenced by CNetCacheWriter::UploadCacheFile(), and CNetCacheWriter::Write().

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

Definition at line 391 of file netcache_rw.cpp.

References buf, CONNSERV_THROW_FMT, count, eIO_Close, eIO_Interrupt, eIO_Read, eIO_ReadWrite, eIO_Success, eIO_Write, eRW_Success, g_CTimeoutToSTimeout(), g_RW_ResultToString(), g_STimeoutToCTimeout(), CNetServerPool::GetCommunicationTimeout(), CDeadline::GetRemainingTime(), in(), CNetCacheWriter::m_Connection, CNetCacheWriter::m_NetCacheAPI, SNetServerConnectionImpl::m_Server, SNetServiceImpl::m_ServerPool, SNetCacheAPIImpl::m_Service, SNetServerConnectionImpl::m_Socket, CNetCacheWriter::m_TransmissionWriter, msg(), out(), NStr::ParseEscapes(), poll, CSocketAPI::Poll(), and CSocket::ReadLine().

Referenced by CNetCacheWriter::Transmit().

◆ UnRegisterSession() void CNetICacheClient::UnRegisterSession ( unsigned  pid ) ◆ 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, count, 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 ◆ ~CNetCacheReader() CNetCacheReader::~CNetCacheReader ( ) virtual ◆ ~CNetCacheWriter() CNetCacheWriter::~CNetCacheWriter ( ) virtual ◆ kNetCacheAPIDriverName ◆ kNetICacheDriverName ◆ m_ActualBlobAgePtr unsigned* CNetCacheAPIParameters::m_ActualBlobAgePtr private ◆ 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 ◆ m_CachingEnabled [1/2] bool CNetCacheReader::m_CachingEnabled private ◆ m_CachingEnabled [2/2] bool CNetCacheWriter::m_CachingEnabled private ◆ m_CachingMode ◆ m_Connection [1/2] ◆ m_Connection [2/2] ◆ m_CreationTime time_t CNetCacheKey::m_CreationTime private ◆ m_Defaults ◆ m_DefinedParameters

Definition at line 190 of file netcache_params.hpp.

Referenced by 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().

◆ m_Flags ◆ m_Host ◆ m_HostPortCRC32 unsigned CNetCacheKey::m_HostPortCRC32 private ◆ m_Id unsigned int CNetCacheKey::m_Id private ◆ m_Impl [1/3] ◆ m_Impl [2/3]

Definition at line 144 of file netcache_api.hpp.

Referenced by CNetCacheAPI::GetAdmin(), CNetCacheAPI::GetBlobInfo(), CNetCacheAPI::GetBlobSize(), CNetCacheAPI::GetCompoundIDPool(), CNetCacheAPI::GetData(), CNetCacheAPI::GetPartReader(), CNetCacheAPI::GetReader(), CNetCacheAPIExt::GetServer(), CNetCacheAPI::GetService(), CNetCacheAPI::HasBlob(), CNetCacheAPI::ProlongBlobLifetime(), CNetCacheAPI::PutData(), CNetCacheAPI::ReadPart(), CNetCacheAPI::Remove(), CNetCacheAPI::SetCompoundIDPool(), and CNetCacheAPI::SetDefaultParameters().

◆ m_Impl [3/3]

Definition at line 72 of file neticache_client.hpp.

Referenced by CNetICacheClient::GetBlobAccess(), CNetICacheClient::GetBlobInfo(), CNetICacheClient::GetBlobSize(), CNetICacheClient::GetCacheName(), CNetICacheClient::GetCommunicationTimeout(), CNetICacheClient::GetFlags(), CNetICacheClientExt::GetNetCacheAPI(), CNetICacheClient::GetNetCacheWriter(), CNetICacheClient::GetReadStream(), CNetICacheClientExt::GetReadStream(), CNetICacheClient::GetReadStreamPart(), CNetICacheClientExt::GetServer(), CNetICacheClient::GetService(), CNetICacheClient::HasBlob(), CNetICacheClientExt::ProlongBlobLifetime(), CNetICacheClient::Purge(), CNetICacheClient::ReadPart(), CNetICacheClient::RemoveBlob(), CNetICacheClient::Search(), CNetICacheClient::SetBlobVersionAsCurrent(), CNetICacheClient::SetCommunicationTimeout(), CNetICacheClient::SetFlags(), and CNetICacheClient::Store().

◆ m_IStream ◆ m_Key [1/2] ◆ m_Key [2/2] ◆ m_MaxBlobAge unsigned CNetCacheAPIParameters::m_MaxBlobAge private ◆ m_MirroringMode ◆ m_NCClient ◆ m_NetCacheAPI ◆ m_OStream ◆ m_Parameters ◆ m_Password ◆ m_Port unsigned short CNetCacheKey::m_Port private ◆ m_PrimaryKey string CNetCacheKey::m_PrimaryKey private ◆ m_Random Uint4 CNetCacheKey::m_Random private ◆ m_ResponseType ◆ m_ServerCheck ESwitch CNetCacheAPIParameters::m_ServerCheck private ◆ m_ServerCheckHint bool CNetCacheAPIParameters::m_ServerCheckHint private ◆ m_ServerLastUsedPtr CNetServer* CNetCacheAPIParameters::m_ServerLastUsedPtr private ◆ m_ServerToUse ◆ m_ServiceName string CNetCacheKey::m_ServiceName private ◆ m_SocketReaderWriter ◆ m_TransmissionWriter ◆ m_TryAllServers bool CNetCacheAPIParameters::m_TryAllServers private ◆ m_TTL unsigned CNetCacheAPIParameters::m_TTL private ◆ m_UseCompoundID bool CNetCacheAPIParameters::m_UseCompoundID private ◆ m_Version unsigned CNetCacheKey::m_Version private

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4