Search Toolkit Book for CBDB_CacheIWriter
CBDB_CacheIWriter (CBDB_Cache &bdb_cache, const char *path, unsigned blob_id_ext, const string &blob_key, int version, const string &subkey, SCache_AttrDB &attr_db, unsigned int ttl, time_t request_time, const string &owner, CBDB_Cache::TBlobLock &blob_lock) virtual ~CBDB_CacheIWriter () virtual ERW_Result 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...Definition at line 251 of file bdb_blobcache.cpp.
◆ TBuffer ◆ CBDB_CacheIWriter() [1/2] CBDB_CacheIWriter::CBDB_CacheIWriter ( CBDB_Cache & bdb_cache, const char * path, unsigned blob_id_ext, const string & blob_key, int version, const string & subkey, SCache_AttrDB & attr_db, unsigned int ttl, time_t request_time, const string & owner, CBDB_Cache::TBlobLock & blob_lock ) inline ◆ ~CBDB_CacheIWriter() virtual CBDB_CacheIWriter::~CBDB_CacheIWriter ( ) inlinevirtualDefinition at line 296 of file bdb_blobcache.cpp.
References _TRACE, SBDB_CacheStatistics::AddStore(), CSimpleBufferT< T, ResizeStrategy >::data(), ERR_POST_X, CBDB_Cache::IsSaveStatistics(), CBDB_Cache::KillBlob(), m_BlobIdExt, m_BlobKey, m_BlobSize, m_BlobStore, m_BlobUpdate, m_Buffer, m_Cache, CBDB_Cache::m_DB_Lock, m_Flushed, m_Overflow, m_OverflowFile, m_Owner, m_RequestTime, CBDB_Cache::m_Statistics, m_SubKey, m_TTL, m_Version, CBDB_Cache::RegisterOverflow(), CSimpleBufferT< T, ResizeStrategy >::size(), and CBDB_Cache::x_Store().
◆ CBDB_CacheIWriter() [2/2] ◆ Flush() virtual ERW_Result CBDB_CacheIWriter::Flush ( void ) inlinevirtualFlush pending data (if any) down to output device.
Implements IWriter.
Definition at line 457 of file bdb_blobcache.cpp.
References _ASSERT, BDB_THROW, CSimpleBufferT< T, ResizeStrategy >::clear(), CSimpleBufferT< T, ResizeStrategy >::data(), eRW_Success, CBDB_Cache::KillBlob(), m_BlobIdExt, m_BlobKey, m_BlobLock, m_Buffer, m_Cache, m_Flushed, m_OverflowFile, m_Owner, m_SubKey, m_TTL, m_Version, CSimpleBufferT< T, ResizeStrategy >::size(), CLockVectorGuard< TLockVect >::Unlock(), and CBDB_Cache::x_Store().
◆ OpenOverflowFile() void CBDB_CacheIWriter::OpenOverflowFile ( ) inlineprivateDefinition at line 536 of file bdb_blobcache.cpp.
References _TRACE, BDB_THROW, CBDB_Cache::GetName(), m_BlobKey, m_Cache, m_Overflow, m_OverflowFile, m_OverflowFilePath, m_Path, m_SubKey, m_Version, out(), s_MakeOverflowFileName(), and trunc.
Referenced by Write().
◆ operator=() ◆ Write() virtual ERW_Result CBDB_CacheIWriter::Write ( const void * buf, size_t count, size_t * bytes_written =0
) inlinevirtual
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 371 of file bdb_blobcache.cpp.
References _ASSERT, SBDB_CacheStatistics::AddBlobQuotaError(), BDB_THROW, buf, CSimpleBufferT< T, ResizeStrategy >::clear(), count, CSimpleBufferT< T, ResizeStrategy >::data(), eRW_Error, eRW_Success, CBDB_Cache::GetMaxBlobSize(), CBDB_Cache::GetOverflowLimit(), CBDB_Cache::IsSaveStatistics(), CBDB_Cache::KillBlob(), m_BlobKey, m_BlobSize, m_Buffer, m_Cache, CBDB_Cache::m_DB_Lock, m_Flushed, m_OverflowFile, m_Owner, CBDB_Cache::m_Statistics, m_SubKey, m_Version, msg(), OpenOverflowFile(), CSimpleBufferT< T, ResizeStrategy >::resize(), CSimpleBufferT< T, ResizeStrategy >::size(), NStr::UIntToString(), and x_WriteOverflow().
◆ x_WriteOverflow() void CBDB_CacheIWriter::x_WriteOverflow ( const char * buf, streamsize count ) inlineprivateDefinition at line 556 of file bdb_blobcache.cpp.
References _ASSERT, BDB_THROW, buf, count, CBDB_Cache::KillBlob(), m_BlobKey, m_Cache, m_OverflowFile, m_OverflowFilePath, m_SubKey, m_Version, and CBDB_Cache::WriteOverflow().
Referenced by Write().
◆ m_AttrDB ◆ m_BlobIdExt unsigned CBDB_CacheIWriter::m_BlobIdExt private ◆ m_BlobKey string CBDB_CacheIWriter::m_BlobKey private ◆ m_BlobLock ◆ m_BlobSize unsigned CBDB_CacheIWriter::m_BlobSize private ◆ m_BlobStore unsigned CBDB_CacheIWriter::m_BlobStore private ◆ m_BlobUpdate unsigned CBDB_CacheIWriter::m_BlobUpdate private ◆ m_Buffer TBuffer CBDB_CacheIWriter::m_Buffer private ◆ m_Cache ◆ m_Flushed bool CBDB_CacheIWriter::m_Flushed private ◆ m_Overflow unsigned CBDB_CacheIWriter::m_Overflow private ◆ m_OverflowFile ◆ m_OverflowFilePath string CBDB_CacheIWriter::m_OverflowFilePath private ◆ m_Owner string CBDB_CacheIWriter::m_Owner private ◆ m_Path const char* CBDB_CacheIWriter::m_Path private ◆ m_RequestTime time_t CBDB_CacheIWriter::m_RequestTime private ◆ m_StampSubKey ◆ m_SubKey string CBDB_CacheIWriter::m_SubKey private ◆ m_TTL unsigned int CBDB_CacheIWriter::m_TTL private ◆ m_Version int CBDB_CacheIWriter::m_Version private ◆ m_WSyncThe documentation for this class was generated from the following file:
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