MySQL 5.6.14 Source Code Document
|
#include <FsBuffer.hpp>
Public Member Functions | |
FsBuffer () | |
const char * | setup (Uint32 *Buffer, Uint32 Size, Uint32 BlockSize=128, Uint32 MinRead=1024, Uint32 MaxRead=1024, Uint32 MaxWrite=1024) |
const char * | valid () const |
Uint32 | getBufferSize () const |
Uint32 | getUsableSize () const |
Uint32 * | getStart () const |
bool | getReadPtr (Uint32 **ptr, Uint32 *sz, bool *eof) |
void | updateReadPtr (Uint32 sz) |
bool | getWritePtr (Uint32 **ptr, Uint32 sz) |
void | updateWritePtr (Uint32 sz) |
void | eof () |
Uint32 | getMaxWrite () const |
Uint32 | getMinRead () const |
Uint32 | getFreeSize () const |
void | reset () |
A circular data buffer to be used together with the FS
One writer - Typically your block getWritePtr() updateWritePtr()
One reader - Typically "thread" in your block sending stuff to NDBFS getReadPtr() updateReadPtr()
Definition at line 36 of file FsBuffer.hpp.
|
inline |
Default constructor
Definition at line 138 of file FsBuffer.hpp.
|
inline |
There will be no more writing to this buffer
Definition at line 358 of file FsBuffer.hpp.
|
inline |
Getters for varibles
Definition at line 108 of file FsBuffer.hpp.
|
inline |
getReadPtr - Get pointer and size of data to send to FS
ptr | - Where to fetch data |
sz | - How much data in 32-bit words |
eof | - Is this the last fetch (only if return false) |
Definition at line 255 of file FsBuffer.hpp.
|
inline |
Definition at line 313 of file FsBuffer.hpp.
|
inline |
reset
Definition at line 215 of file FsBuffer.hpp.
|
inline |
setup FsBuffer
Buffer | - Ptr to continuous memory |
Size | - Buffer size in 32-bit words |
BlockSize | - Size of block in 32-bit words |
MinRead | - Min read size in 32-bit words Get rounded(down) to nearest multiple of block size. |
MaxRead | - Max read size in 32-bit words Get rounded(down) to nearest multiple of block size. |
MaxWrite | - Maximum write (into buffer) in 32-bit words |
Definition at line 166 of file FsBuffer.hpp.
|
inline |
Definition at line 303 of file FsBuffer.hpp.