8 const LIBMEMCACHED_VERSION_HEX
= 16777240;
9 const OPT_COMPRESSION
= -1001;
10 const OPT_COMPRESSION_TYPE
= -1004;
11 const OPT_PREFIX_KEY
= -1002;
12 const OPT_SERIALIZER
= -1003;
13 const OPT_STORE_RETRY_COUNT
= -1005;
14 const HAVE_IGBINARY
= 0;
16 const HAVE_MSGPACK
= 0;
17 const HAVE_SESSION
= 1;
20 const HASH_DEFAULT
= 0;
23 const HASH_FNV1_64
= 3;
24 const HASH_FNV1A_64
= 4;
25 const HASH_FNV1_32
= 5;
26 const HASH_FNV1A_32
= 6;
28 const HASH_MURMUR
= 8;
29 const OPT_DISTRIBUTION
= 9;
30 const DISTRIBUTION_MODULA
= 0;
31 const DISTRIBUTION_CONSISTENT
= 1;
32 const DISTRIBUTION_VIRTUAL_BUCKET
= 6;
33 const OPT_LIBKETAMA_COMPATIBLE
= 16;
34 const OPT_LIBKETAMA_HASH
= 17;
35 const OPT_TCP_KEEPALIVE
= 32;
36 const OPT_BUFFER_WRITES
= 10;
37 const OPT_BINARY_PROTOCOL
= 18;
38 const OPT_NO_BLOCK
= 0;
39 const OPT_TCP_NODELAY
= 1;
40 const OPT_SOCKET_SEND_SIZE
= 4;
41 const OPT_SOCKET_RECV_SIZE
= 5;
42 const OPT_CONNECT_TIMEOUT
= 14;
43 const OPT_RETRY_TIMEOUT
= 15;
44 const OPT_DEAD_TIMEOUT
= 36;
45 const OPT_SEND_TIMEOUT
= 19;
46 const OPT_RECV_TIMEOUT
= 20;
47 const OPT_POLL_TIMEOUT
= 8;
48 const OPT_CACHE_LOOKUPS
= 6;
49 const OPT_SERVER_FAILURE_LIMIT
= 21;
50 const OPT_AUTO_EJECT_HOSTS
= 28;
51 const OPT_HASH_WITH_PREFIX_KEY
= 25;
52 const OPT_NOREPLY
= 26;
53 const OPT_SORT_HOSTS
= 12;
54 const OPT_VERIFY_KEY
= 13;
55 const OPT_USE_UDP
= 27;
56 const OPT_NUMBER_OF_REPLICAS
= 29;
57 const OPT_RANDOMIZE_REPLICA_READ
= 30;
58 const OPT_REMOVE_FAILED_SERVERS
= 35;
59 const OPT_SERVER_TIMEOUT_LIMIT
= 37;
60 const RES_SUCCESS
= 0;
61 const RES_FAILURE
= 1;
62 const RES_HOST_LOOKUP_FAILURE
= 2;
63 const RES_UNKNOWN_READ_FAILURE
= 7;
64 const RES_PROTOCOL_ERROR
= 8;
65 const RES_CLIENT_ERROR
= 9;
66 const RES_SERVER_ERROR
= 10;
67 const RES_WRITE_FAILURE
= 5;
68 const RES_DATA_EXISTS
= 12;
69 const RES_NOTSTORED
= 14;
70 const RES_NOTFOUND
= 16;
71 const RES_PARTIAL_READ
= 18;
72 const RES_SOME_ERRORS
= 19;
73 const RES_NO_SERVERS
= 20;
76 const RES_BUFFERED
= 32;
77 const RES_TIMEOUT
= 31;
78 const RES_BAD_KEY_PROVIDED
= 33;
79 const RES_STORED
= 15;
80 const RES_DELETED
= 22;
83 const RES_NOT_SUPPORTED
= 28;
84 const RES_FETCH_NOTFINISHED
= 30;
85 const RES_SERVER_MARKED_DEAD
= 35;
86 const RES_UNKNOWN_STAT_KEY
= 36;
87 const RES_INVALID_HOST_PROTOCOL
= 34;
88 const RES_MEMORY_ALLOCATION_FAILURE
= 17;
89 const RES_CONNECTION_SOCKET_CREATE_FAILURE
= 11;
91 const RES_KEY_TOO_BIG
= 39;
92 const RES_SERVER_TEMPORARILY_DISABLED
= 47;
93 const RES_SERVER_MEMORY_ALLOCATION_FAILURE
= 48;
94 const RES_AUTH_PROBLEM
= 40;
95 const RES_AUTH_FAILURE
= 41;
96 const RES_AUTH_CONTINUE
= 42;
97 const RES_PAYLOAD_FAILURE
= -1001;
98 const SERIALIZER_PHP
= 1;
99 const SERIALIZER_IGBINARY
= 2;
100 const SERIALIZER_JSON
= 3;
101 const SERIALIZER_JSON_ARRAY
= 4;
102 const SERIALIZER_MSGPACK
= 5;
103 const COMPRESSION_FASTLZ
= 2;
104 const COMPRESSION_ZLIB
= 1;
105 const GET_PRESERVE_ORDER
= 1;
106 const GET_ERROR_RETURN_VALUE
= false;
108 public function __construct($persistent_id = NULL, $callback = NULL) {
111 public function getResultCode() {
114 public function getResultMessage() {
117 public function get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) {
120 public function getByKey($server_key, $key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) {
123 public function getMulti(array $keys, &$cas_tokens = NULL, $flags = NULL, &$udf_flags = NULL) {
126 public function getMultiByKey($server_key, array $keys, &$cas_tokens = NULL, $flags = NULL, &$udf_flags = NULL) {
129 public function getDelayed(array $keys, $with_cas = NULL, $value_cb = NULL) {
132 public function getDelayedByKey($server_key, array $keys, $with_cas = NULL, $value_cb = NULL) {
135 public function fetch() {
138 public function fetchAll() {
141 public function set($key, $value, $expiration = NULL, $udf_flags = NULL) {
144 public function setByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
147 public function touch($key, $expiration) {
150 public function touchByKey($server_key, $key, $expiration) {
153 public function setMulti(array $items, $expiration = NULL, $udf_flags = NULL) {
156 public function setMultiByKey($server_key, array $items, $expiration = NULL, $udf_flags = NULL) {
159 public function cas($cas_token, $key, $value, $expiration = NULL, $udf_flags = NULL) {
162 public function casByKey($cas_token, $server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
165 public function add($key, $value, $expiration = NULL, $udf_flags = NULL) {
168 public function addByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
171 public function append($key, $value, $expiration = NULL) {
174 public function appendByKey($server_key, $key, $value, $expiration = NULL) {
177 public function prepend($key, $value, $expiration = NULL) {
180 public function prependByKey($server_key, $key, $value, $expiration = NULL) {
183 public function replace($key, $value, $expiration = NULL, $udf_flags = NULL) {
186 public function replaceByKey($server_key, $key, $value, $expiration = NULL, $udf_flags = NULL) {
189 public function delete($key, $time = NULL) {
192 public function deleteMulti($keys, $time = NULL) {
195 public function deleteByKey($server_key, $key, $time = NULL) {
198 public function deleteMultiByKey($server_key, $keys, $time = NULL) {
201 public function increment($key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
204 public function decrement($key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
207 public function incrementByKey($server_key, $key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
210 public function decrementByKey($server_key, $key, $offset = NULL, $initial_value = NULL, $expiry = NULL) {
213 public function addServer($host, $port, $weight = NULL) {
216 public function addServers(array $servers) {
219 public function getServerList() {
222 public function getServerByKey($server_key) {
225 public function resetServerList() {
228 public function quit() {
231 public function flushBuffers() {
234 public function getLastErrorMessage() {
237 public function getLastErrorCode() {
240 public function getLastErrorErrno() {
243 public function getLastDisconnectedServer() {
246 public function getStats() {
249 public function getVersion() {
252 public function getAllKeys() {
255 public function flush($delay = NULL) {
258 public function getOption($option) {
261 public function setOption($option, $value) {
264 public function setOptions($options) {
267 public function setBucket($host_map, $forward_map, $replicas) {
270 public function setSaslAuthData($username, $password) {
273 public function isPersistent() {
276 public function isPristine() {
281 class MemcachedException
extends \RuntimeException