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/classCBDB__CacheIWriter.html below:

NCBI C++ ToolKit: CBDB_CacheIWriter Class Reference

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...
  virtual ERW_Result  Flush (void)   Flush pending data (if any) down to output device. More...
  virtual  ~IWriter ()  

Definition at line 251 of file bdb_blobcache.cpp.

◆ TBuffer ◆ CBDB_CacheIWriter() [1/2] CBDB_CacheIWriter::CBDB_CacheIWriter ( CBDB_Cachebdb_cache, const char *  path, unsigned  blob_id_ext, const stringblob_key, int  version, const stringsubkey, SCache_AttrDBattr_db, unsigned int  ttl, time_t  request_time, const stringowner, CBDB_Cache::TBlobLockblob_lock  ) inline ◆ ~CBDB_CacheIWriter() virtual CBDB_CacheIWriter::~CBDB_CacheIWriter ( ) inlinevirtual

Definition 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  ) inlinevirtual

Flush 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 ( ) inlineprivate

Definition 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").

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

Definition 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_WSync

The 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