Search Toolkit Book for CStringOrBlobStorageReader
String or Blob Storage Reader. More...
#include <connect/services/grid_rw_impl.hpp>
String or Blob Storage Reader.
An implementation of the IReader interface with a dual behavior. If "data_or_key" parameter can be interpreted as Blob Storage key and a blob with given key is found in the storage, then the storage is used as data source. Otherwise "data_or_key" is a data source.
Definition at line 99 of file grid_rw_impl.hpp.
◆ EType ◆ CStringOrBlobStorageReader()Definition at line 157 of file grid_rw_impl.cpp.
References eEmbedded, eEmpty, eNetCache, CNetCacheAPI::GetReader(), CNetService::GetServerPool(), CNetCacheAPI::GetService(), JOB_OUTPUT_PREFIX_LEN, kEmptyStr, ncbi::grid::netcache::search::fields::key, m_BytesToRead, m_Data, m_NetCacheReader, m_Storage, NCBI_THROW_FMT, NULL, CNetServerPool::StickToServer(), NStr::UIntToString(), and x_GetDataType().
◆ PendingCount() ERW_Result CStringOrBlobStorageReader::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 216 of file grid_rw_impl.cpp.
References count, eRW_Success, m_BytesToRead, and m_NetCacheReader.
◆ Read() ERW_Result CStringOrBlobStorageReader::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 194 of file grid_rw_impl.cpp.
References buf, count, eRW_Eof, eRW_Success, m_BytesToRead, m_Data, m_NetCacheReader, and NULL.
Referenced by CAsnBinCompressed::GetJobStreamProperties().
◆ x_GetDataType()Definition at line 139 of file grid_rw_impl.cpp.
References NStr::CompareCase(), data, eEmbedded, eEmpty, eNetCache, eRaw, JOB_OUTPUT_PREFIX_LEN, s_JobOutputPrefixEmbedded, and s_JobOutputPrefixNetCache.
Referenced by SDataDetector::AddNode(), CStringOrBlobStorageReader(), and SRemoteApp::x_CreateDataNode().
◆ m_BytesToRead size_t CStringOrBlobStorageReader::m_BytesToRead private ◆ m_Data string CStringOrBlobStorageReader::m_Data private ◆ m_NetCacheReader unique_ptr<IReader> CStringOrBlobStorageReader::m_NetCacheReader private ◆ m_StorageThe documentation for this class 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