1 <?hh // decl /* -*- php -*- */
3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the 'hack' directory of this source tree.
13 const int REDIS_NOT_FOUND = 0;
14 const int REDIS_STRING = 1;
15 const int REDIS_SET = 2;
16 const int REDIS_LIST = 3;
17 const int REDIS_ZSET = 4;
18 const int REDIS_HASH = 5;
21 const int PIPELINE = 2;
22 const int OPT_SERIALIZER = 1;
23 const int OPT_PREFIX = 2;
24 const int OPT_READ_TIMEOUT = 3;
25 const int SERIALIZER_NONE = 0;
26 const int SERIALIZER_PHP = 1;
27 const int OPT_SCAN = 4;
28 const int SCAN_RETRY = 1;
29 const int SCAN_NORETRY = 0;
30 const string AFTER = 'after';
31 const string BEFORE = 'before';
32 public function __construct() {}
33 public function connect($host, $port = 6379, $timeout = 0.0) {}
34 public function psetex($key, $ttl, $value) {}
35 public function sScan($key, &$iterator, $pattern = '', $count = 0) {}
36 public function scan(&$iterator, $pattern = '', $count = 0) {}
37 public function zScan($key, &$iterator, $pattern = '', $count = 0) {}
38 public function hScan($key, &$iterator, $pattern = '', $count = 0) {}
39 public function client($command, $arg = '') {}
40 public function slowlog($command) {}
41 public function open($host, $port = 6379, $timeout = 0.0) {}
42 public function pconnect($host, $port = 6379, $timeout = 0.0) {}
43 public function popen($host, $port = 6379, $timeout = 0.0) {}
44 public function close() {}
45 public function setOption($name, $value) {}
46 public function getOption($name) {}
47 public function ping() {}
48 public function get($key) {}
49 public function set($key, $value, $timeout = 0) {}
50 public function setex($key, $ttl, $value) {}
51 public function setnx($key, $value) {}
52 public function del($key1, $key2 = null, $key3 = null) {}
53 public function delete($key1, $key2 = null, $key3 = null) {}
54 public function multi() {}
55 public function exec() {}
56 public function discard() {}
57 public function watch($key) {}
58 public function unwatch() {}
59 public function subscribe($channels, $callback) {}
60 public function psubscribe($patterns, $callback) {}
61 public function publish($channel, $message) {}
62 public function exists($key) {}
63 public function incr($key) {}
64 public function incrByFloat($key, $increment) {}
65 public function incrBy($key, $value) {}
66 public function decr($key) {}
67 public function decrBy($key, $value) {}
68 public function getMultiple(array $keys) {}
69 public function lPush($key, $value1, $value2 = null, $valueN = null) {}
70 public function rPush($key, $value1, $value2 = null, $valueN = null) {}
71 public function lPushx($key, $value) {}
72 public function rPushx($key, $value) {}
73 public function lPop($key) {}
74 public function rPop($key) {}
75 public function blPop(array $keys) {}
76 public function brPop(array $keys) {}
77 public function lLen($key) {}
78 public function lSize($key) {}
79 public function lIndex($key, $index) {}
80 public function lGet($key, $index) {}
81 public function lSet($key, $index, $value) {}
82 public function lRange($key, $start, $end) {}
83 public function lGetRange($key, $start, $end) {}
84 public function lTrim($key, $start, $stop) {}
85 public function listTrim($key, $start, $stop) {}
86 public function lRem($key, $value, $count) {}
87 public function lRemove($key, $value, $count) {}
88 public function lInsert($key, $position, $pivot, $value) {}
89 public function sAdd($key, $value1, $value2 = null, $valueN = null) {}
90 public function sRem($key, $member1, $member2 = null, $memberN = null) {}
91 public function sRemove($key, $member1, $member2 = null, $memberN = null) {}
92 public function sMove($srcKey, $dstKey, $member) {}
93 public function sIsMember($key, $value) {}
94 public function sContains($key, $value) {}
95 public function sCard($key) {}
96 public function sPop($key) {}
97 public function sRandMember($key) {}
98 public function sInter($key1, $key2, $keyN = null) {}
99 public function sInterStore($dstKey, $key1, $key2, $keyN = null) {}
100 public function sUnion($key1, $key2, $keyN = null) {}
101 public function sUnionStore($dstKey, $key1, $key2, $keyN = null) {}
102 public function sDiff($key1, $key2, $keyN = null) {}
103 public function sDiffStore($dstKey, $key1, $key2, $keyN = null) {}
104 public function sMembers($key) {}
105 public function sGetMembers($key) {}
106 public function getSet($key, $value) {}
107 public function randomKey() {}
108 public function select($dbindex) {}
109 public function move($key, $dbindex) {}
110 public function rename($srcKey, $dstKey) {}
111 public function renameKey($srcKey, $dstKey) {}
112 public function renameNx($srcKey, $dstKey) {}
113 public function expire($key, $ttl) {}
114 public function pExpire($key, $ttl) {}
115 public function setTimeout($key, $ttl) {}
116 public function expireAt($key, $timestamp) {}
117 public function pExpireAt($key, $timestamp) {}
118 public function keys($pattern) {}
119 public function getKeys($pattern) {}
120 public function dbSize() {}
121 public function auth($password) {}
122 public function bgrewriteaof() {}
123 public function slaveof($host = '127.0.0.1', $port = 6379) {}
124 public function object($string = '', $key = '') {}
125 public function save() {}
126 public function bgsave() {}
127 public function lastSave() {}
128 public function type($key) {}
129 public function append($key, $value) {}
130 public function getRange($key, $start, $end) {}
131 public function substr($key, $start, $end) {}
132 public function setRange($key, $offset, $value) {}
133 public function strlen($key) {}
134 public function getBit($key, $offset) {}
135 public function setBit($key, $offset, $value) {}
136 public function bitCount($key) {}
137 public function bitOp($operation, $retKey, $key1, $key2, $key3 = null) {}
138 public function flushDB() {}
139 public function flushAll() {}
140 public function sort($key, $option = null) {}
141 public function info($option = null) {}
142 public function resetStat() {}
143 public function ttl($key) {}
144 public function pttl($key) {}
145 public function persist($key) {}
146 public function mset(array $array) {}
147 public function mget(array $array) {}
148 public function msetnx(array $array) {}
149 public function rpoplpush($srcKey, $dstKey) {}
150 public function brpoplpush($srcKey, $dstKey, $timeout) {}
151 public function zAdd($key, $score1, $value1, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) {}
152 public function zRange($key, $start, $end, $withscores = null) {}
153 public function zRem($key, $member1, $member2 = null, $memberN = null) {}
154 public function zDelete($key, $member1, $member2 = null, $memberN = null) {}
155 public function zRevRange($key, $start, $end, $withscore = null) {}
156 public function zRangeByScore($key, $start, $end, array $options = array()) {}
157 public function zRevRangeByScore($key, $start, $end, array $options = array()) {}
158 public function zCount($key, $start, $end) {}
159 public function zRemRangeByScore($key, $start, $end) {}
160 public function zDeleteRangeByScore($key, $start, $end) {}
161 public function zRemRangeByRank($key, $start, $end) {}
162 public function zDeleteRangeByRank($key, $start, $end) {}
163 public function zCard($key) {}
164 public function zSize($key) {}
165 public function zScore($key, $member) {}
166 public function zRank($key, $member) {}
167 public function zRevRank($key, $member) {}
168 public function zIncrBy($key, $value, $member) {}
169 public function zUnion($Output, $ZSetKeys, array $Weights = array(), $aggregateFunction = 'SUM') {}
170 public function zInter($Output, $ZSetKeys, array $Weights = array(), $aggregateFunction = 'SUM') {}
171 public function hSet($key, $hashKey, $value) {}
172 public function hSetNx($key, $hashKey, $value) {}
173 public function hGet($key, $hashKey) {}
174 public function hLen($key) {}
175 public function hDel($key, $hashKey1, $hashKey2 = null, $hashKeyN = null) {}
176 public function hKeys($key) {}
177 public function hVals($key) {}
178 public function hGetAll($key) {}
179 public function hExists($key, $hashKey) {}
180 public function hIncrBy($key, $hashKey, $value) {}
181 public function hIncrByFloat($key, $field, $increment) {}
182 public function hMset($key, $hashKeys) {}
183 public function hMGet($key, $hashKeys) {}
184 public function config($operation, $key, $value) {}
185 public function evaluate($script, $args = array(), $numKeys = 0) {}
186 public function evalSha($scriptSha, $args = array(), $numKeys = 0) {}
187 public function evaluateSha($scriptSha, $args = array(), $numKeys = 0) {}
188 public function script($command, $script) {}
189 public function getLastError() {}
190 public function clearLastError() {}
191 public function _prefix($value) {}
192 public function _unserialize($value) {}
193 public function dump($key) {}
194 public function restore($key, $ttl, $value) {}
195 public function migrate($host, $port, $key, $db, $timeout) {}
196 public function time() {}
200 class RedisException extends RuntimeException {
205 public function __call($function_name, $arguments) {}
206 public function __construct($name = '', array $hosts = array(), array $opts = array()) {}
207 public function _distributor() {}
208 public function _function() {}
209 public function _hosts() {}
210 public function _instance() {}
211 public function _rehash() {}
212 public function _target() {}
213 public function bgsave() {}
214 public function del() {}
215 public function delete() {}
216 public function discard() {}
217 public function exec() {}
218 public function flushall() {}
219 public function flushdb() {}
220 public function getMultiple() {}
221 public function getOption() {}
222 public function info() {}
223 public function keys() {}
224 public function mget() {}
225 public function mset() {}
226 public function multi() {}
227 public function ping() {}
228 public function save() {}
229 public function select() {}
230 public function setOption() {}
231 public function unwatch() {}