Drizzled Public API Documentation

WriteBuffer Class Reference

List of all members.

Public Member Functions

 WriteBuffer ()
void lock ()
void unlock ()
void resize (size_t new_size)
uint8_t * getRawBytes ()
size_t getCapacity ()

Static Public Attributes

static const size_t DEFAULT_WRITE_BUFFER_SIZE = 1024

Private Member Functions

 WriteBuffer (const WriteBuffer &)
WriteBufferoperator= (const WriteBuffer &)

Private Attributes

std::vector< uint8_t > buffer
 Raw memory buffer managed by the log.
pthread_mutex_t latch
 Lock around the synchronized parts of the log (the write buffer)

Detailed Description

Definition at line 37 of file write_buffer.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 47 of file write_buffer.cc.

References buffer, and latch.


Member Function Documentation

size_t WriteBuffer::getCapacity ( ) [inline]

Returns the size of the write buffer

Definition at line 76 of file write_buffer.h.

References buffer.

uint8_t* WriteBuffer::getRawBytes ( ) [inline]

Returns the pointer to the raw bytes.

Definition at line 69 of file write_buffer.h.

References buffer.

Referenced by TransactionLogApplier::apply().

void WriteBuffer::lock ( void  ) [inline]

Locks the log write buffer

Definition at line 49 of file write_buffer.h.

References latch.

Referenced by TransactionLogApplier::apply().

void WriteBuffer::resize ( size_t  new_size)

Resizes the internal raw byte buffer

Parameters:
[in]Newsize to allocate

Definition at line 60 of file write_buffer.cc.

References buffer.

Referenced by TransactionLogApplier::apply().

void WriteBuffer::unlock ( void  ) [inline]

Unlocks the log's write buffer

Definition at line 56 of file write_buffer.h.

References latch.

Referenced by TransactionLogApplier::apply().


The documentation for this class was generated from the following files: