Drizzled Public API Documentation

drizzled::internal::st_io_cache Struct Reference

List of all members.

Public Member Functions

void close_cached_file ()
bool real_open_cached_file ()
int end_io_cache ()
 Free an st_io_cache object.
int init_io_cache (int file, size_t cachesize, enum cache_type type, my_off_t seek_offset, bool use_async_io, myf cache_myflags)
 Initialize an st_io_cache object.
void init_functions ()
bool reinit_io_cache (enum cache_type type_arg, my_off_t seek_offset, bool use_async_io, bool clear_cache)
 Reset the cache.
void setup_io_cache ()
 Setup internal pointers inside st_io_cache.
bool open_cached_file (const char *dir, const char *prefix, size_t cache_size, myf cache_myflags)

Public Attributes

my_off_t pos_in_file
my_off_t end_of_file
unsigned char * read_pos
unsigned char * read_end
unsigned char * buffer
unsigned char * request_pos
unsigned char * write_buffer
unsigned char * append_read_pos
unsigned char * write_pos
unsigned char * write_end
unsigned char ** current_pos
unsigned char ** current_end
int(* read_function )(struct st_io_cache *, unsigned char *, size_t)
int(* write_function )(struct st_io_cache *, const unsigned char *, size_t)
enum cache_type type
int error
IO_CACHE_CALLBACK pre_read
IO_CACHE_CALLBACK post_read
IO_CACHE_CALLBACK pre_close
void * arg
char * file_name
char * dir
char * prefix
int file
int seek_not_done
size_t buffer_length
size_t read_length
myf myflags
bool alloced_buffer

Detailed Description

Definition at line 33 of file iocache.h.


Member Function Documentation

int drizzled::internal::st_io_cache::end_io_cache ( )

Free an st_io_cache object.

It's currently safe to call this if one has called init_io_cache() on the 'info' object, even if init_io_cache() failed. This function is also safe to call twice with the same handle.

Parameters:
infost_io_cache Handle to free
Return values:
0ok
#Error

Definition at line 927 of file mf_iocache.cc.

int drizzled::internal::st_io_cache::init_io_cache ( int  file_arg,
size_t  cachesize,
enum cache_type  type_arg,
my_off_t  seek_offset,
bool  use_async_io,
myf  cache_myflags 
)

Initialize an st_io_cache object.

Parameters:
fileFile that should be associated with the handler If == -1 then real_open_cached_file() will be called when it's time to open file.
cachesizeSize of buffer to allocate for read/write If == 0 then use my_default_record_cache_size
typeType of cache
seek_offsetWhere cache should start reading/writing
use_async_ioSet to 1 if we should use async_io (if avaiable)
cache_myflagsBitmap of different flags MY_WME | MY_FAE | MY_NABP | MY_FNABP | MY_DONT_CHECK_FILESIZE
Return values:
0success
#error

Definition at line 178 of file mf_iocache.cc.

bool drizzled::internal::st_io_cache::reinit_io_cache ( enum cache_type  type_arg,
my_off_t  seek_offset,
bool  use_async_io,
bool  clear_cache 
)

Reset the cache.

Use this to reset cache to re-start reading or to change the type between READ_CACHE <-> WRITE_CACHE If we are doing a reinit of a cache where we have the start of the file in the cache, we are reusing this memory without flushing it to disk.

Definition at line 335 of file mf_iocache.cc.

Referenced by drizzled::FileSort::merge_many_buff(), drizzled::read_buffpek_from_file(), drizzled::FileSort::run(), and drizzled::update_query().

void drizzled::internal::st_io_cache::setup_io_cache ( )

Setup internal pointers inside st_io_cache.

This is called on automatically on init or reinit of st_io_cache It must be called externally if one moves or copies an st_io_cache object.

Parameters:
infoCache handler to setup

Definition at line 125 of file mf_iocache.cc.

Referenced by drizzled::FileSort::merge_many_buff().


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