Adbase
Adinf C++ base library V2
adbase::mc Namespace Reference

Classes

class  Ascii
 
class  Binary
 
class  ClientHandler
 
class  Context
 
class  Handler
 
class  Interface
 
struct  ProtocolBinaryRequestFlushExtras
 Definition of the packet used by the flush command See section 4 Please note that the expiration field is optional, so remember to see check the header.bodysize to see if it is present. More...
 
union  ProtocolBinaryRequestHeader
 Definition of the header structure for a request packet. More...
 
struct  ProtocolBinaryRequestIncrExtras
 Definition of the structure used by the increment and decrement command. More...
 
struct  ProtocolBinaryRequestSetExtras
 Definition of the packet used by set, add and replace See section 4. More...
 
union  ProtocolBinaryResponseGet
 Definition of the packet returned from a successful get, getq, getk and getkq. More...
 
union  ProtocolBinaryResponseHeader
 Definition of the header structure for a response packet. More...
 
union  ProtocolBinaryResponseIncr
 Definition of the response from an incr or decr command command. More...
 
union  ProtocolBinaryResponseNoExtras
 Definition of a response-packet containing no extras. More...
 

Typedefs

typedef enum adbase::mc::AsciiCmd AsciiCmd
 
typedef ProtocolBinaryRequestSetExtras ProtocolBinaryRequestAddExtras
 
typedef ProtocolBinaryRequestSetExtras ProtocolBinaryRequestReplaceExtras
 
typedef ProtocolBinaryRequestIncrExtras ProtocolBinaryRequestDecrExtras
 
typedef ProtocolBinaryResponseIncr ProtocolBinaryResponseDecr
 
typedef std::function< void(const std::string &, Buffer *, ClientHandler *)> GetCallback
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t *cas)> AddHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, const void *data, uint32_t datalen, uint64_t cas, uint64_t *resultCas)> AppendHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, uint64_t delta, uint64_t initial, uint32_t expiration, uint64_t *result, uint64_t *resultCas)> DecrementHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, uint64_t cas)> DeleteHandler
 
typedef std::function< ProtocolBinaryResponseStatus(uint32_t when)> FlushHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, Buffer *data)> GetHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, uint64_t delta, uint64_t initial, uint32_t expiration, uint64_t *result, uint64_t *resultCas)> IncrementHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, const void *data, uint32_t datalen, uint64_t cas, uint64_t *resultCas)> PrependHandler
 
typedef std::function< ProtocolBinaryResponseStatus()> NoopHandler
 
typedef std::function< ProtocolBinaryResponseStatus()> QuitHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t cas, uint64_t *resultCas)> ReplaceHander
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t cas, uint64_t *resultCas)> SetHandler
 
typedef std::function< ProtocolBinaryResponseStatus(const void *key, uint16_t keylen, Buffer *data)> StatHandler
 
typedef std::function< ProtocolBinaryResponseStatus(Buffer *data)> VersionHandler
 
typedef std::function< ProtocolBinaryResponseStatus(uint32_t)> VerbosityHandler
 
typedef std::function< void()> PreExecute
 
typedef std::function< void()> PostExecute
 
typedef std::function< void()> UnknownExecute
 

Enumerations

enum  AsciiCmd {
  GET_CMD, GETS_CMD, SET_CMD, ADD_CMD,
  REPLACE_CMD, CAS_CMD, APPEND_CMD, PREPEND_CMD,
  DELETE_CMD, INCR_CMD, DECR_CMD, STATS_CMD,
  FLUSH_ALL_CMD, VERSION_CMD, QUIT_CMD, VERBOSITY_CMD,
  UNKNOWN_CMD
}
 
enum  ProtocolBinaryMagic { PROTOCOL_BINARY_REQ = 0x80, PROTOCOL_BINARY_RES = 0x81 }
 Definition of the legal "magic" values used in a packet. More...
 
enum  ProtocolBinaryResponseStatus {
  PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00, PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01, PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02, PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03,
  PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04, PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05, PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL = 0x06, PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET = 0x07,
  PROTOCOL_BINARY_RESPONSE_AUTH_ERROR = 0x20, PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE = 0x21, PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81, PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82,
  PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED = 0x83, PROTOCOL_BINARY_RESPONSE_EINTERNAL = 0x84, PROTOCOL_BINARY_RESPONSE_EBUSY = 0x85, PROTOCOL_BINARY_RESPONSE_ETMPFAIL = 0x86
}
 Definition of the valid response status numbers. More...
 
enum  ProtocolBinaryCommand {
  PROTOCOL_BINARY_CMD_GET = 0x00, PROTOCOL_BINARY_CMD_SET = 0x01, PROTOCOL_BINARY_CMD_ADD = 0x02, PROTOCOL_BINARY_CMD_REPLACE = 0x03,
  PROTOCOL_BINARY_CMD_DELETE = 0x04, PROTOCOL_BINARY_CMD_INCREMENT = 0x05, PROTOCOL_BINARY_CMD_DECREMENT = 0x06, PROTOCOL_BINARY_CMD_QUIT = 0x07,
  PROTOCOL_BINARY_CMD_FLUSH = 0x08, PROTOCOL_BINARY_CMD_GETQ = 0x09, PROTOCOL_BINARY_CMD_NOOP = 0x0a, PROTOCOL_BINARY_CMD_VERSION = 0x0b,
  PROTOCOL_BINARY_CMD_GETK = 0x0c, PROTOCOL_BINARY_CMD_GETKQ = 0x0d, PROTOCOL_BINARY_CMD_APPEND = 0x0e, PROTOCOL_BINARY_CMD_PREPEND = 0x0f,
  PROTOCOL_BINARY_CMD_STAT = 0x10, PROTOCOL_BINARY_CMD_SETQ = 0x11, PROTOCOL_BINARY_CMD_ADDQ = 0x12, PROTOCOL_BINARY_CMD_REPLACEQ = 0x13,
  PROTOCOL_BINARY_CMD_DELETEQ = 0x14, PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15, PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16, PROTOCOL_BINARY_CMD_QUITQ = 0x17,
  PROTOCOL_BINARY_CMD_FLUSHQ = 0x18, PROTOCOL_BINARY_CMD_APPENDQ = 0x19, PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a, PROTOCOL_BINARY_CMD_VERBOSITY = 0x1b,
  PROTOCOL_BINARY_CMD_TOUCH = 0x1c, PROTOCOL_BINARY_CMD_GAT = 0x1d, PROTOCOL_BINARY_CMD_GATQ = 0x1e, PROTOCOL_BINARY_CMD_GATK = 0x23,
  PROTOCOL_BINARY_CMD_GATKQ = 0x24, PROTOCOL_BINARY_CMD_SASL_LIST_MECHS = 0x20, PROTOCOL_BINARY_CMD_SASL_AUTH = 0x21, PROTOCOL_BINARY_CMD_SASL_STEP = 0x22,
  PROTOCOL_BINARY_CMD_RGET = 0x30, PROTOCOL_BINARY_CMD_RSET = 0x31, PROTOCOL_BINARY_CMD_RSETQ = 0x32, PROTOCOL_BINARY_CMD_RAPPEND = 0x33,
  PROTOCOL_BINARY_CMD_RAPPENDQ = 0x34, PROTOCOL_BINARY_CMD_RPREPEND = 0x35, PROTOCOL_BINARY_CMD_RPREPENDQ = 0x36, PROTOCOL_BINARY_CMD_RDELETE = 0x37,
  PROTOCOL_BINARY_CMD_RDELETEQ = 0x38, PROTOCOL_BINARY_CMD_RINCR = 0x39, PROTOCOL_BINARY_CMD_RINCRQ = 0x3a, PROTOCOL_BINARY_CMD_RDECR = 0x3b,
  PROTOCOL_BINARY_CMD_RDECRQ = 0x3c, PROTOCOL_BINARY_CMD_SET_VBUCKET = 0x3d, PROTOCOL_BINARY_CMD_GET_VBUCKET = 0x3e, PROTOCOL_BINARY_CMD_DEL_VBUCKET = 0x3f,
  PROTOCOL_BINARY_CMD_TAP_CONNECT = 0x40, PROTOCOL_BINARY_CMD_TAP_MUTATION = 0x41, PROTOCOL_BINARY_CMD_TAP_DELETE = 0x42, PROTOCOL_BINARY_CMD_TAP_FLUSH = 0x43,
  PROTOCOL_BINARY_CMD_TAP_OPAQUE = 0x44, PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET = 0x45, PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START = 0x46, PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END = 0x47,
  PROTOCOL_BINARY_CMD_LAST_RESERVED = 0xef, PROTOCOL_BINARY_CMD_SCRUB = 0xf0
}
 Defintion of the different command opcodes. More...
 
enum  ProtocolBinaryDatatypes { PROTOCOL_BINARY_RAW_BYTES = 0x00 }
 Definition of the data types in the packet. More...
 

Typedef Documentation

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t* cas)> adbase::mc::AddHandler

Definition at line 29 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, const void *data, uint32_t datalen, uint64_t cas, uint64_t* resultCas)> adbase::mc::AppendHandler

Definition at line 37 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, uint64_t delta, uint64_t initial, uint32_t expiration, uint64_t* result, uint64_t* resultCas)> adbase::mc::DecrementHandler

Definition at line 46 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, uint64_t cas)> adbase::mc::DeleteHandler

Definition at line 51 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (uint32_t when)> adbase::mc::FlushHandler

Definition at line 54 of file Interface.hpp.

typedef std::function<void (const std::string&, Buffer*, ClientHandler*)> adbase::mc::GetCallback

Definition at line 19 of file ClientHandler.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, Buffer *data)> adbase::mc::GetHandler

Definition at line 59 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, uint64_t delta, uint64_t initial, uint32_t expiration, uint64_t* result, uint64_t* resultCas)> adbase::mc::IncrementHandler

Definition at line 68 of file Interface.hpp.

Definition at line 79 of file Interface.hpp.

typedef std::function<void ()> adbase::mc::PostExecute

Definition at line 119 of file Interface.hpp.

typedef std::function<void ()> adbase::mc::PreExecute

Definition at line 116 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, const void *data, uint32_t datalen, uint64_t cas, uint64_t* resultCas)> adbase::mc::PrependHandler

Definition at line 76 of file Interface.hpp.

Definition at line 82 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t cas, uint64_t* resultCas)> adbase::mc::ReplaceHander

Definition at line 92 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, const void *data, uint32_t datalen, uint32_t flags, uint32_t exptime, uint64_t cas, uint64_t* resultCas)> adbase::mc::SetHandler

Definition at line 102 of file Interface.hpp.

typedef std::function<ProtocolBinaryResponseStatus (const void* key, uint16_t keylen, Buffer *data)> adbase::mc::StatHandler

Definition at line 107 of file Interface.hpp.

typedef std::function<void ()> adbase::mc::UnknownExecute

Definition at line 122 of file Interface.hpp.

Definition at line 113 of file Interface.hpp.

Definition at line 110 of file Interface.hpp.

Enumeration Type Documentation

Enumerator
GET_CMD 
GETS_CMD 
SET_CMD 
ADD_CMD 
REPLACE_CMD 
CAS_CMD 
APPEND_CMD 
PREPEND_CMD 
DELETE_CMD 
INCR_CMD 
DECR_CMD 
STATS_CMD 
FLUSH_ALL_CMD 
VERSION_CMD 
QUIT_CMD 
VERBOSITY_CMD 
UNKNOWN_CMD 

Definition at line 22 of file Ascii.hpp.

Defintion of the different command opcodes.

Enumerator
PROTOCOL_BINARY_CMD_GET 
PROTOCOL_BINARY_CMD_SET 
PROTOCOL_BINARY_CMD_ADD 
PROTOCOL_BINARY_CMD_REPLACE 
PROTOCOL_BINARY_CMD_DELETE 
PROTOCOL_BINARY_CMD_INCREMENT 
PROTOCOL_BINARY_CMD_DECREMENT 
PROTOCOL_BINARY_CMD_QUIT 
PROTOCOL_BINARY_CMD_FLUSH 
PROTOCOL_BINARY_CMD_GETQ 
PROTOCOL_BINARY_CMD_NOOP 
PROTOCOL_BINARY_CMD_VERSION 
PROTOCOL_BINARY_CMD_GETK 
PROTOCOL_BINARY_CMD_GETKQ 
PROTOCOL_BINARY_CMD_APPEND 
PROTOCOL_BINARY_CMD_PREPEND 
PROTOCOL_BINARY_CMD_STAT 
PROTOCOL_BINARY_CMD_SETQ 
PROTOCOL_BINARY_CMD_ADDQ 
PROTOCOL_BINARY_CMD_REPLACEQ 
PROTOCOL_BINARY_CMD_DELETEQ 
PROTOCOL_BINARY_CMD_INCREMENTQ 
PROTOCOL_BINARY_CMD_DECREMENTQ 
PROTOCOL_BINARY_CMD_QUITQ 
PROTOCOL_BINARY_CMD_FLUSHQ 
PROTOCOL_BINARY_CMD_APPENDQ 
PROTOCOL_BINARY_CMD_PREPENDQ 
PROTOCOL_BINARY_CMD_VERBOSITY 
PROTOCOL_BINARY_CMD_TOUCH 
PROTOCOL_BINARY_CMD_GAT 
PROTOCOL_BINARY_CMD_GATQ 
PROTOCOL_BINARY_CMD_GATK 
PROTOCOL_BINARY_CMD_GATKQ 
PROTOCOL_BINARY_CMD_SASL_LIST_MECHS 
PROTOCOL_BINARY_CMD_SASL_AUTH 
PROTOCOL_BINARY_CMD_SASL_STEP 
PROTOCOL_BINARY_CMD_RGET 
PROTOCOL_BINARY_CMD_RSET 
PROTOCOL_BINARY_CMD_RSETQ 
PROTOCOL_BINARY_CMD_RAPPEND 
PROTOCOL_BINARY_CMD_RAPPENDQ 
PROTOCOL_BINARY_CMD_RPREPEND 
PROTOCOL_BINARY_CMD_RPREPENDQ 
PROTOCOL_BINARY_CMD_RDELETE 
PROTOCOL_BINARY_CMD_RDELETEQ 
PROTOCOL_BINARY_CMD_RINCR 
PROTOCOL_BINARY_CMD_RINCRQ 
PROTOCOL_BINARY_CMD_RDECR 
PROTOCOL_BINARY_CMD_RDECRQ 
PROTOCOL_BINARY_CMD_SET_VBUCKET 
PROTOCOL_BINARY_CMD_GET_VBUCKET 
PROTOCOL_BINARY_CMD_DEL_VBUCKET 
PROTOCOL_BINARY_CMD_TAP_CONNECT 
PROTOCOL_BINARY_CMD_TAP_MUTATION 
PROTOCOL_BINARY_CMD_TAP_DELETE 
PROTOCOL_BINARY_CMD_TAP_FLUSH 
PROTOCOL_BINARY_CMD_TAP_OPAQUE 
PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET 
PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START 
PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END 
PROTOCOL_BINARY_CMD_LAST_RESERVED 
PROTOCOL_BINARY_CMD_SCRUB 

Definition at line 61 of file Binary.hpp.

Definition of the data types in the packet.

Enumerator
PROTOCOL_BINARY_RAW_BYTES 

Definition at line 147 of file Binary.hpp.

Definition of the legal "magic" values used in a packet.

Enumerator
PROTOCOL_BINARY_REQ 
PROTOCOL_BINARY_RES 

Definition at line 25 of file Binary.hpp.

Definition of the valid response status numbers.

Enumerator
PROTOCOL_BINARY_RESPONSE_SUCCESS 
PROTOCOL_BINARY_RESPONSE_KEY_ENOENT 
PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS 
PROTOCOL_BINARY_RESPONSE_E2BIG 
PROTOCOL_BINARY_RESPONSE_EINVAL 
PROTOCOL_BINARY_RESPONSE_NOT_STORED 
PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL 
PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET 
PROTOCOL_BINARY_RESPONSE_AUTH_ERROR 
PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE 
PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND 
PROTOCOL_BINARY_RESPONSE_ENOMEM 
PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED 
PROTOCOL_BINARY_RESPONSE_EINTERNAL 
PROTOCOL_BINARY_RESPONSE_EBUSY 
PROTOCOL_BINARY_RESPONSE_ETMPFAIL 

Definition at line 36 of file Binary.hpp.