STXXL
1.4.1
|
Encapsulates asynchronous buffered block writing engine.
buffered_writer
overlaps I/Os with filling of output buffer.
Definition at line 36 of file buf_writer.h.
Classes | |
struct | batch_entry |
struct | batch_entry_cmp |
Public Member Functions | |
buffered_writer (unsigned_type write_buf_size, unsigned_type write_batch_size) | |
Constructs an object. More... | |
~buffered_writer () | |
Flushes not yet written buffers and frees used memory. More... | |
void | flush () |
Flushes not yet written buffers. More... | |
block_type * | get_free_block () |
Returns free block from the internal buffer pool. More... | |
block_type * | write (block_type *filled_block, const bid_type &bid) |
Submits block for writing. More... | |
Protected Types | |
typedef std::priority_queue < batch_entry, std::vector < batch_entry > , batch_entry_cmp > | batch_type |
Protected Attributes | |
batch_type | batch_write_blocks |
std::vector< int_type > | busy_write_blocks |
std::vector< int_type > | free_write_blocks |
const unsigned_type | nwriteblocks |
bid_type * | write_bids |
block_type * | write_buffers |
request_ptr * | write_reqs |
const unsigned_type | writebatchsize |
Private Types | |
typedef block_type::bid_type | bid_type |
typedef BlockType | block_type |
Additional Inherited Members | |
Private Member Functions inherited from stxxl::noncopyable | |
noncopyable () | |
|
protected |
Definition at line 66 of file buf_writer.h.
|
private |
Definition at line 39 of file buf_writer.h.
|
private |
Definition at line 38 of file buf_writer.h.
|
inline |
Constructs an object.
write_buf_size | number of write buffers to use |
write_batch_size | number of blocks to accumulate in order to flush write requests (bulk buffered writing) |
Definition at line 74 of file buf_writer.h.
|
inline |
Flushes not yet written buffers and frees used memory.
Definition at line 189 of file buf_writer.h.
|
inline |
Flushes not yet written buffers.
Definition at line 157 of file buf_writer.h.
|
inline |
Returns free block from the internal buffer pool.
Definition at line 90 of file buf_writer.h.
|
inline |
Submits block for writing.
filled_block | pointer to the block |
filled_block
must be value returned by get_free_block()
or write()
methods bid | block identifier, a place to write data of the filled_block |
Definition at line 130 of file buf_writer.h.
|
protected |
Definition at line 67 of file buf_writer.h.
|
protected |
Definition at line 49 of file buf_writer.h.
|
protected |
Definition at line 48 of file buf_writer.h.
|
protected |
Definition at line 42 of file buf_writer.h.
|
protected |
Definition at line 44 of file buf_writer.h.
|
protected |
Definition at line 43 of file buf_writer.h.
|
protected |
Definition at line 45 of file buf_writer.h.
|
protected |
Definition at line 46 of file buf_writer.h.