MySQL 5.6.14 Source Code Document
|
#include <engine.h>
Public Attributes | |
struct engine_interface | interface |
const engine_info *(* | get_info )(ENGINE_HANDLE *handle) |
ENGINE_ERROR_CODE(* | initialize )(ENGINE_HANDLE *handle, const char *config_str) |
void(* | destroy )(ENGINE_HANDLE *handle, const bool force) |
ENGINE_ERROR_CODE(* | allocate )(ENGINE_HANDLE *handle, const void *cookie, item **item, const void *key, const size_t nkey, const size_t nbytes, const int flags, const rel_time_t exptime) |
ENGINE_ERROR_CODE(* | remove )(ENGINE_HANDLE *handle, const void *cookie, const void *key, const size_t nkey, uint64_t cas, uint16_t vbucket) |
ENGINE_ERROR_CODE(* | bind )(ENGINE_HANDLE *handle, const void *cookie, const void *name, const size_t name_len) |
void(* | release )(ENGINE_HANDLE *handle, const void *cookie, item *item) |
void(* | clean_engine )(ENGINE_HANDLE *handle, const void *cookie, void *engine_data) |
ENGINE_ERROR_CODE(* | get )(ENGINE_HANDLE *handle, const void *cookie, item **item, const void *key, const int nkey, uint16_t vbucket) |
ENGINE_ERROR_CODE(* | store )(ENGINE_HANDLE *handle, const void *cookie, item *item, uint64_t *cas, ENGINE_STORE_OPERATION operation, uint16_t vbucket) |
ENGINE_ERROR_CODE(* | arithmetic )(ENGINE_HANDLE *handle, const void *cookie, const void *key, const int nkey, const bool increment, const bool create, const uint64_t delta, const uint64_t initial, const rel_time_t exptime, uint64_t *cas, uint64_t *result, uint16_t vbucket) |
ENGINE_ERROR_CODE(* | flush )(ENGINE_HANDLE *handle, const void *cookie, time_t when) |
ENGINE_ERROR_CODE(* | get_stats )(ENGINE_HANDLE *handle, const void *cookie, const char *stat_key, int nkey, ADD_STAT add_stat) |
void(* | reset_stats )(ENGINE_HANDLE *handle, const void *cookie) |
void *(* | get_stats_struct )(ENGINE_HANDLE *handle, const void *cookie) |
ENGINE_ERROR_CODE(* | aggregate_stats )(ENGINE_HANDLE *handle, const void *cookie, void(*callback)(void *, void *), void *) |
ENGINE_ERROR_CODE(* | unknown_command )(ENGINE_HANDLE *handle, const void *cookie, protocol_binary_request_header *request, ADD_RESPONSE response) |
ENGINE_ERROR_CODE(* | tap_notify )(ENGINE_HANDLE *handle, const void *cookie, void *engine_specific, uint16_t nengine, uint8_t ttl, uint16_t tap_flags, tap_event_t tap_event, uint32_t tap_seqno, const void *key, size_t nkey, uint32_t flags, uint32_t exptime, uint64_t cas, const void *data, size_t ndata, uint16_t vbucket) |
TAP_ITERATOR(* | get_tap_iterator )(ENGINE_HANDLE *handle, const void *cookie, const void *client, size_t nclient, uint32_t flags, const void *userdata, size_t nuserdata) |
void(* | item_set_cas )(ENGINE_HANDLE *handle, const void *cookie, item *item, uint64_t cas) |
bool(* | get_item_info )(ENGINE_HANDLE *handle, const void *cookie, const item *item, item_info *item_info) |
size_t(* | errinfo )(ENGINE_HANDLE *handle, const void *cookie, char *buffer, size_t buffsz) |
ENGINE_ERROR_CODE(* engine_interface_v1::aggregate_stats)(ENGINE_HANDLE *handle, const void *cookie, void(*callback)(void *, void *), void *) |
ENGINE_ERROR_CODE(* engine_interface_v1::allocate)(ENGINE_HANDLE *handle, const void *cookie, item **item, const void *key, const size_t nkey, const size_t nbytes, const int flags, const rel_time_t exptime) |
Allocate an item.
handle | the engine handle |
cookie | The cookie provided by the frontend |
output | variable that will receive the item |
key | the item's key |
nkey | the length of the key |
nbytes | the number of bytes that will make up the value of this item. |
flags | the item's flags |
exptime | the maximum lifetime of this item |
ENGINE_ERROR_CODE(* engine_interface_v1::arithmetic)(ENGINE_HANDLE *handle, const void *cookie, const void *key, const int nkey, const bool increment, const bool create, const uint64_t delta, const uint64_t initial, const rel_time_t exptime, uint64_t *cas, uint64_t *result, uint16_t vbucket) |
Perform an increment or decrement operation on an item.
handle | the engine handle |
cookie | The cookie provided by the frontend |
key | the key to look up |
nkey | the length of the key |
increment | if true, increment the value, else decrement |
create | if true, create the item if it's missing |
delta | the amount to increment or decrement. |
initial | when creating, specifies the initial value |
exptime | when creating, specifies the expiration time |
cas | output CAS value |
result | output arithmetic value |
vbucket | the virtual bucket id |
void(* engine_interface_v1::clean_engine)(ENGINE_HANDLE *handle, const void *cookie, void *engine_data) |
void(* engine_interface_v1::destroy)(ENGINE_HANDLE *handle, const bool force) |
size_t(* engine_interface_v1::errinfo)(ENGINE_HANDLE *handle, const void *cookie, char *buffer, size_t buffsz) |
ENGINE_ERROR_CODE(* engine_interface_v1::flush)(ENGINE_HANDLE *handle, const void *cookie, time_t when) |
ENGINE_ERROR_CODE(* engine_interface_v1::get)(ENGINE_HANDLE *handle, const void *cookie, item **item, const void *key, const int nkey, uint16_t vbucket) |
Retrieve an item.
handle | the engine handle |
cookie | The cookie provided by the frontend |
item | output variable that will receive the located item |
key | the key to look up |
nkey | the length of the key |
vbucket | the virtual bucket id |
const engine_info*(* engine_interface_v1::get_info)(ENGINE_HANDLE *handle) |
bool(* engine_interface_v1::get_item_info)(ENGINE_HANDLE *handle, const void *cookie, const item *item, item_info *item_info) |
Get information about an item.
The loader of the module may need the pointers to the actual data within an item. Instead of having to create multiple functions to get each individual item, this function will get all of them.
handle | the engine that owns the object |
cookie | connection cookie for this item |
item | the item to request information about |
item_info |
ENGINE_ERROR_CODE(* engine_interface_v1::get_stats)(ENGINE_HANDLE *handle, const void *cookie, const char *stat_key, int nkey, ADD_STAT add_stat) |
Get statistics from the engine.
handle | the engine handle |
cookie | The cookie provided by the frontend |
stat_key | optional argument to stats |
nkey | the length of the stat_key |
add_stat | callback to feed results to the output |
void*(* engine_interface_v1::get_stats_struct)(ENGINE_HANDLE *handle, const void *cookie) |
TAP_ITERATOR(* engine_interface_v1::get_tap_iterator)(ENGINE_HANDLE *handle, const void *cookie, const void *client, size_t nclient, uint32_t flags, const void *userdata, size_t nuserdata) |
Get (or create) a Tap iterator for this connection.
handle | the engine handle |
cookie | The connection cookie |
client | The "name" of the client |
nclient | The number of bytes in the client name |
flags | Tap connection flags |
userdata | Specific userdata the engine may know how to use |
nuserdata | The size of the userdata |
ENGINE_ERROR_CODE(* engine_interface_v1::initialize)(ENGINE_HANDLE *handle, const char *config_str) |
struct engine_interface engine_interface_v1::interface |
void(* engine_interface_v1::item_set_cas)(ENGINE_HANDLE *handle, const void *cookie, item *item, uint64_t cas) |
void(* engine_interface_v1::release)(ENGINE_HANDLE *handle, const void *cookie, item *item) |
ENGINE_ERROR_CODE(* engine_interface_v1::remove)(ENGINE_HANDLE *handle, const void *cookie, const void *key, const size_t nkey, uint64_t cas, uint16_t vbucket) |
void(* engine_interface_v1::reset_stats)(ENGINE_HANDLE *handle, const void *cookie) |
ENGINE_ERROR_CODE(* engine_interface_v1::store)(ENGINE_HANDLE *handle, const void *cookie, item *item, uint64_t *cas, ENGINE_STORE_OPERATION operation, uint16_t vbucket) |
Store an item.
handle | the engine handle |
cookie | The cookie provided by the frontend |
item | the item to store |
cas | the CAS value for conditional sets |
operation | the type of store operation to perform. |
vbucket | the virtual bucket id |
ENGINE_ERROR_CODE(* engine_interface_v1::tap_notify)(ENGINE_HANDLE *handle, const void *cookie, void *engine_specific, uint16_t nengine, uint8_t ttl, uint16_t tap_flags, tap_event_t tap_event, uint32_t tap_seqno, const void *key, size_t nkey, uint32_t flags, uint32_t exptime, uint64_t cas, const void *data, size_t ndata, uint16_t vbucket) |
Callback for all incoming TAP messages. It is up to the engine to determine what to do with the event. The core will create and send a TAP_ACK message if the flag section contains TAP_FLAG_SEND_ACK with the status byte mapped from the return code.
handle | the engine handle |
cookie | identification for the tap stream |
engine_specific | pointer to engine specific data (received) |
nengine_specific | number of bytes of engine specific data |
ttl | ttl for this item (Tap stream hops) |
tap_flags | tap flags for this object |
tap_event | the tap event from over the wire |
tap_seqno | sequence number for this item |
key | the key in the message |
nkey | the number of bytes in the key |
flags | the flags for the item |
exptime | the expiry time for the object |
cas | the cas for the item |
data | the data for the item |
ndata | the number of bytes in the object |
vbucket | the virtual bucket for the object |
ENGINE_ERROR_CODE(* engine_interface_v1::unknown_command)(ENGINE_HANDLE *handle, const void *cookie, protocol_binary_request_header *request, ADD_RESPONSE response) |