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 &) | |
| WriteBuffer & | operator= (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) | |
Definition at line 37 of file write_buffer.h.
| WriteBuffer::WriteBuffer | ( | ) |
| 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
| [in] | New | size 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().