NCBI C++ ToolKit
Public Member Functions | List of all members
CStringOrBlobStorageWriter Class Reference

Search Toolkit Book for CStringOrBlobStorageWriter

String or Blob Storage Writer. More...

#include <connect/services/grid_rw_impl.hpp>

+ Inheritance diagram for CStringOrBlobStorageWriter:
+ Collaboration diagram for CStringOrBlobStorageWriter:

Public Member Functions

 CStringOrBlobStorageWriter (size_t max_string_size, SNetCacheAPIImpl *storage, string &job_output_ref)
 
- Public Member Functions inherited from CStringOrWriter
 CStringOrWriter (size_t max_data_size, string &data_ref, TWriterCreate writer_create)
 
ERW_Result Write (const void *buf, size_t count, size_t *bytes_written=0) override
 Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device. More...
 
ERW_Result Flush () override
 Flush pending data (if any) down to the output device. More...
 
void Close () override
 
void Abort () override
 
- Public Member Functions inherited from IWriter
virtual ~IWriter ()
 

Additional Inherited Members

- Public Types inherited from CStringOrWriter
using TWriterCreate = function< IEmbeddedStreamWriter *(string &)>
 

Detailed Description

String or Blob Storage Writer.

An implementation of the IWriter interface with a dual behavior. It writes data into the "data_or_key" parameter until the total number of written bytes reaches "max_string_size" parameter. After that all data from "data_or_key" is stored into the Blob Storage and all next calls to Write method will write data to the Blob Storage. In this case "data_or_key" parameter holds a blob key for the written data.

Definition at line 74 of file grid_rw_impl.hpp.

Constructor & Destructor Documentation

◆ CStringOrBlobStorageWriter()

CStringOrBlobStorageWriter::CStringOrBlobStorageWriter ( size_t  max_string_size,
SNetCacheAPIImpl storage,
string job_output_ref 
)

Definition at line 109 of file grid_rw_impl.cpp.


The documentation for this class was generated from the following files:
Modified on Sat Mar 02 10:58:05 2024 by modify_doxy.py rev. 669887