Search Toolkit Book for SNetStorage_NetCacheBlob
#include "netstorage_direct_nc.hpp"
(Private to src/connect/services
.)
Definition at line 41 of file netstorage_direct_nc.hpp.
◆ SNetStorage_NetCacheBlob() ◆ Abort() void SNetStorage_NetCacheBlob::Abort ( void ) overridevirtual ◆ Close() void SNetStorage_NetCacheBlob::Close ( void ) overridevirtual ◆ Eof() bool SNetStorage_NetCacheBlob::Eof ( void ) overridevirtual ◆ Exists() bool SNetStorage_NetCacheBlob::Exists ( void ) overridevirtual ◆ FileTrack_Path() string SNetStorage_NetCacheBlob::FileTrack_Path ( ) overridevirtual ◆ Flush() ◆ GetAttribute() ◆ GetAttributeList() list< string > SNetStorage_NetCacheBlob::GetAttributeList ( ) const overridevirtual ◆ GetInfo()Implements INetStorageObjectState.
Definition at line 164 of file netstorage_direct_nc.cpp.
References CJsonNode::AsInteger(), eNFL_NetCache, eNFL_NotFound, CNetStorageException::eNotExists, NStr::fSplit_ByPattern, g_CreateNetStorageObjectInfo(), CNetCacheAPI::GetBlobInfo(), CNetCacheAPI::GetBlobSize(), CJsonNode::GetByKeyOrNull(), CException::GetErrCode(), CJsonNode::GuessType(), CNetCacheAPI::HasBlob(), CJsonNode::IsInteger(), ncbi::grid::netcache::search::fields::key, m_BlobKey, m_NetCacheAPI, NETSTORAGE_CONVERT_NETCACHEEXCEPTION, CJsonNode::NewObjectNode(), NULL, output, CJsonNode::SetByKey(), NStr::SplitInTwo(), and val.
◆ GetLoc() string SNetStorage_NetCacheBlob::GetLoc ( void ) const inlineoverridevirtual ◆ GetSize() Uint8 SNetStorage_NetCacheBlob::GetSize ( void ) overridevirtual ◆ PendingCount() ERW_Result SNetStorage_NetCacheBlob::PendingCount ( size_t * count ) overridevirtualVia 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 78 of file netstorage_direct_nc.cpp.
References count, and eRW_Success.
◆ Read() ERW_Result SNetStorage_NetCacheBlob::Read ( void * buf, size_t count, size_t * bytes_read ) overridevirtualRead 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 48 of file netstorage_direct_nc.cpp.
References buffer, INetStorageObjectState::EnterState(), SNetCacheAPIImpl::GetPartReader(), m_BlobKey, m_IState, m_NetCacheAPI, and NETSTORAGE_CONVERT_NETCACHEEXCEPTION.
◆ Relocate() ◆ Remove() ◆ SetAttribute() ◆ SetExpiration() void SNetStorage_NetCacheBlob::SetExpiration ( const CTimeout & ttl ) overridevirtual ◆ StartWriting() void SNetStorage_NetCacheBlob::StartWriting ( ) ◆ Write() ERW_Result SNetStorage_NetCacheBlob::Write ( const void * buf, size_t count, size_t * bytes_written ) overridevirtualWrite 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 109 of file netstorage_direct_nc.cpp.
References m_OState, and StartWriting().
◆ m_BlobKey string SNetStorage_NetCacheBlob::m_BlobKey privateDefinition at line 119 of file netstorage_direct_nc.hpp.
Referenced by Exists(), FileTrack_Path(), GetAttribute(), GetAttributeList(), GetInfo(), GetLoc(), GetSize(), Read(), Relocate(), Remove(), SetAttribute(), SetExpiration(), StartWriting(), and SNetStorage_NetCacheBlob::SOState::Write().
◆ m_IState ◆ m_NetCacheAPI ◆ m_OStateThe documentation for this struct was generated from the following files:
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