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
Definition at line 567 of file netcache_api.hpp.
◆ TBlobPasswordNamed 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"
Definition at line 531 of file netcache_api.hpp.
◆ TBlobTTLNamed 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
Definition at line 491 of file netcache_api.hpp.
◆ TCacheNameIn 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"
Definition at line 591 of file netcache_api.hpp.
◆ TCachingMode ◆ TDefinedParameters ◆ TInstance [1/3] ◆ TInstance [2/3] ◆ TInstance [3/3] ◆ TMaxBlobAgeNamed 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
Definition at line 559 of file netcache_api.hpp.
◆ TMirroringMode ◆ TNCKeyFlags ◆ TParent [1/2] ◆ TParent [2/2] ◆ TServerCheckNamed 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
Definition at line 514 of file netcache_api.hpp.
◆ TServerCheckHintNamed 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
Definition at line 523 of file netcache_api.hpp.
◆ TServerLastUsedPtrNamed 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
Definition at line 551 of file netcache_api.hpp.
◆ TServerToUseNamed 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
Definition at line 541 of file netcache_api.hpp.
◆ TTryAllServersNamed 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
Definition at line 583 of file netcache_api.hpp.
◆ TUseCompoundIDNamed 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
Definition at line 575 of file netcache_api.hpp.
◆ EAppRegistry [1/2] ◆ EAppRegistry [2/2] ◆ ECachingModeAllows to define caching behavior on a per-call basis.
Enumerator eCaching_AppDefault eCaching_Disable eCaching_EnableDefinition 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_CacheNameDefinition at line 53 of file netcache_params.hpp.
◆ EErrCode [1/2] Enumerator eAuthenticationErrorIf client is not allowed to run this operation.
BLOB key corruption or version mismatch
eKeyFormatErrorServer side error.
eServerErrorBlob is not found.
eBlobNotFoundAccess denied.
eAccessDeniedBlob could not be read completely.
eBlobClippedThe requested command is (yet) unknown.
eUnknownCommandThe requested command is not implemented.
eNotImplementedInvalid response from the server.
eInvalidServerResponseDefinition at line 57 of file netcache_api_expt.hpp.
◆ EErrCode [2/2] ◆ EMirroringModeMirroring modes.
eIfKeyMirrored unconditionally enables mirroring for blobs that were created in mirroring mode.
Enumerator eMirroringDisabled eMirroringEnabled eIfKeyMirroredDefinition at line 155 of file netcache_api.hpp.
◆ ENamedParameterTagNamed 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_CacheNameDefinition at line 212 of file netcache_api.hpp.
◆ ENCKeyFlagBlob and blob key features.
Enumerator fNCKey_SingleServerMark this blob as not mirrored.
fNCKey_NoServerCheckDisable the check for whether the server IP is still in service.
Definition at line 65 of file netcache_key.hpp.
◆ ENetCacheResponseType ◆ EReadResultStatus of GetData() call.
The whole BLOB has been read.
eNotFoundBLOB not found or error.
eReadPartRead part of the BLOB (buffer capacity)
Definition at line 422 of file netcache_api.hpp.
◆ EReloadConfigOptionReload configuration options.
Enumerator eCompleteReloadComplete reload is requested.
eMirrorReloadParameters related to mirroring will only be reloaded.
Definition at line 72 of file netcache_admin.hpp.
◆ EShutdownOptionShutdown options.
Enumerator eNormalShutdownNormal shutdown is requested.
eDrainWait for all blobs to expire.
Definition at line 60 of file netcache_admin.hpp.
◆ EStatPeriodCompletenessEnumeration for use with PrintStat().
Indicates whether to return the current (incomplete) aggregation period or the previous one (which is complete).
Enumerator eReturnCurrentPeriod eReturnCompletePeriodDefinition at line 89 of file netcache_admin.hpp.
◆ Abort() void CNetCacheWriter::Abort ( void ) virtual ◆ AbortConnection() void CNetCacheWriter::AbortConnection ( ) privateDefinition 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 string & host, 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 ) virtualImplements 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.
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.
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.
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.
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 string & data_id ) virtual ◆ Eof() bool CNetCacheReader::Eof ( void ) const inline ◆ EstablishConnection() void CNetCacheWriter::EstablishConnection ( ) privateDefinition 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 ( 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()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.
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.
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.
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.
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.
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.
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_Resultrw_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 ( 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 ) ◆ 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 ) virtualVia 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 ( CNcbiOstream & output_stream ) ◆ PrintHealth() void CNetCacheAdmin::PrintHealth ( CNcbiOstream & output_stream ) ◆ PrintStat() ◆ ProlongBlobLifetime() ◆ Purge() [1/3] void CNetCacheAdmin::Purge ( const string & cache_name ) ◆ Purge() [2/3] ◆ Purge() [3/3] void CNetICacheClient::Purge ( time_t access_timeout ) virtualDelete all BLOBs older than specified.
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.
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).
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 string & key, int version, const string & subkey, 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 string & blob_id ) inline ◆ SetBlobVersionAsCurrent() ◆ SetCacheName() void CNetCacheAPIParameters::SetCacheName ( const string & cache_name ) inline ◆ SetCachingMode() ◆ SetCommunicationTimeout() [1/2] void CNetCacheAPI::SetCommunicationTimeout ( const STimeout & to ) inline ◆ SetCommunicationTimeout() [2/2] void CNetICacheClient::SetCommunicationTimeout ( const STimeout & to ) ◆ 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 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() ◆ SetTimeStampPolicy() void CNetICacheClient::SetTimeStampPolicy ( TTimeStampFlags policy, unsigned int timeout, unsigned int max_timeout =0
) virtual
Set timestamp update policy.
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 ) privateDefinition 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.
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 ) privateDefinition 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 ) privateDefinition 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").
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_DefinedParametersDefinition 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 privateRetroSearch 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