/
RedisPipeline.java
360 lines (197 loc) · 11.7 KB
/
RedisPipeline.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
package redis.clients.jedis.commands;
import redis.clients.jedis.StreamEntryID;
import redis.clients.jedis.BitPosParams;
import redis.clients.jedis.GeoCoordinate;
import redis.clients.jedis.GeoRadiusResponse;
import redis.clients.jedis.GeoUnit;
import redis.clients.jedis.ListPosition;
import redis.clients.jedis.StreamPendingEntry;
import redis.clients.jedis.Response;
import redis.clients.jedis.SortingParams;
import redis.clients.jedis.StreamEntry;
import redis.clients.jedis.Tuple;
import redis.clients.jedis.params.GeoRadiusParam;
import redis.clients.jedis.params.SetParams;
import redis.clients.jedis.params.ZAddParams;
import redis.clients.jedis.params.ZIncrByParams;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface RedisPipeline {
Response<Long> append(String key, String value);
Response<List<String>> blpop(String arg);
Response<List<String>> brpop(String arg);
Response<Long> decr(String key);
Response<Long> decrBy(String key, long decrement);
Response<Long> del(String key);
Response<Long> unlink(String key);
Response<String> echo(String string);
Response<Boolean> exists(String key);
Response<Long> expire(String key, int seconds);
Response<Long> pexpire(String key, long milliseconds);
Response<Long> expireAt(String key, long unixTime);
Response<Long> pexpireAt(String key, long millisecondsTimestamp);
Response<String> get(String key);
Response<Boolean> getbit(String key, long offset);
Response<String> getrange(String key, long startOffset, long endOffset);
Response<String> getSet(String key, String value);
Response<Long> hdel(String key, String... field);
Response<Boolean> hexists(String key, String field);
Response<String> hget(String key, String field);
Response<Map<String, String>> hgetAll(String key);
Response<Long> hincrBy(String key, String field, long value);
Response<Set<String>> hkeys(String key);
Response<Long> hlen(String key);
Response<List<String>> hmget(String key, String... fields);
Response<String> hmset(String key, Map<String, String> hash);
Response<Long> hset(String key, String field, String value);
Response<Long> hset(String key, Map<String, String> hash);
Response<Long> hsetnx(String key, String field, String value);
Response<List<String>> hvals(String key);
Response<Long> incr(String key);
Response<Long> incrBy(String key, long increment);
Response<String> lindex(String key, long index);
Response<Long> linsert(String key, ListPosition where, String pivot, String value);
Response<Long> llen(String key);
Response<String> lpop(String key);
Response<Long> lpush(String key, String... string);
Response<Long> lpushx(String key, String... string);
Response<List<String>> lrange(String key, long start, long stop);
Response<Long> lrem(String key, long count, String value);
Response<String> lset(String key, long index, String value);
Response<String> ltrim(String key, long start, long stop);
Response<Long> move(String key, int dbIndex);
Response<Long> persist(String key);
Response<String> rpop(String key);
Response<Long> rpush(String key, String... string);
Response<Long> rpushx(String key, String... string);
Response<Long> sadd(String key, String... member);
Response<Long> scard(String key);
Response<Boolean> sismember(String key, String member);
Response<String> set(String key, String value);
Response<Boolean> setbit(String key, long offset, boolean value);
Response<String> setex(String key, int seconds, String value);
Response<Long> setnx(String key, String value);
Response<Long> setrange(String key, long offset, String value);
Response<Set<String>> smembers(String key);
Response<List<String>> sort(String key);
Response<List<String>> sort(String key, SortingParams sortingParameters);
Response<String> spop(String key);
Response<Set<String>> spop(String key, long count);
Response<String> srandmember(String key);
Response<Long> srem(String key, String... member);
Response<Long> strlen(String key);
Response<String> substr(String key, int start, int end);
Response<Long> touch(String key);
Response<Long> ttl(String key);
Response<Long> pttl(String key);
Response<String> type(String key);
Response<Long> zadd(String key, double score, String member);
Response<Long> zadd(String key, double score, String member, ZAddParams params);
Response<Long> zadd(String key, Map<String, Double> scoreMembers);
Response<Long> zadd(String key, Map<String, Double> scoreMembers, ZAddParams params);
Response<Long> zcard(String key);
Response<Long> zcount(String key, double min, double max);
Response<Long> zcount(String key, String min, String max);
Response<Double> zincrby(String key, double increment, String member);
Response<Double> zincrby(String key, double increment, String member, ZIncrByParams params);
Response<Set<String>> zrange(String key, long start, long stop);
Response<Set<String>> zrangeByScore(String key, double min, double max);
Response<Set<String>> zrangeByScore(String key, String min, String max);
Response<Set<String>> zrangeByScore(String key, double min, double max, int offset, int count);
Response<Set<String>> zrangeByScore(String key, String min, String max, int offset, int count);
Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min, double max);
Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min, double max, int offset,
int count);
Response<Set<String>> zrevrangeByScore(String key, double max, double min);
Response<Set<String>> zrevrangeByScore(String key, String max, String min);
Response<Set<String>> zrevrangeByScore(String key, double max, double min, int offset, int count);
Response<Set<String>> zrevrangeByScore(String key, String max, String min, int offset, int count);
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, double max, double min);
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, String max, String min);
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, double max, double min, int offset,
int count);
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, String max, String min, int offset,
int count);
Response<Set<Tuple>> zrangeWithScores(String key, long start, long stop);
Response<Long> zrank(String key, String member);
Response<Long> zrem(String key, String... members);
Response<Long> zremrangeByRank(String key, long start, long stop);
Response<Long> zremrangeByScore(String key, double min, double max);
Response<Long> zremrangeByScore(String key, String min, String max);
Response<Set<String>> zrevrange(String key, long start, long stop);
Response<Set<Tuple>> zrevrangeWithScores(String key, long start, long stop);
Response<Long> zrevrank(String key, String member);
Response<Double> zscore(String key, String member);
Response<Set<Tuple>> zpopmin(String key);
Response<Set<Tuple>> zpopmin(String key, long count);
Response<Long> zlexcount(String key, String min, String max);
Response<Set<String>> zrangeByLex(String key, String min, String max);
Response<Set<String>> zrangeByLex(String key, String min, String max,
int offset, int count);
Response<Set<String>> zrevrangeByLex(String key, String max, String min);
Response<Set<String>> zrevrangeByLex(String key, String max, String min,
int offset, int count);
Response<Long> zremrangeByLex(String key, String min, String max);
Response<Long> bitcount(String key);
Response<Long> bitcount(String key, long start, long end);
Response<Long> pfadd(String key, String... elements);
Response<Long> pfcount(String key);
Response<List<Long>> bitfield(String key, String... arguments);
Response<Long> hstrlen(String key, String field);
Response<byte[]> dump(String key);
Response<String> restore(String key, int ttl, byte[] serializedValue);
Response<String> restoreReplace(String key, int ttl, byte[] serializedValue);
Response<String> migrate(String host, int port, String key, int destinationDB, int timeout);
// Geo Commands
Response<Long> geoadd(String key, double longitude, double latitude, String member);
Response<Long> geoadd(String key, Map<String, GeoCoordinate> memberCoordinateMap);
Response<Double> geodist(String key, String member1, String member2);
Response<Double> geodist(String key, String member1, String member2, GeoUnit unit);
Response<List<String>> geohash(String key, String... members);
Response<List<GeoCoordinate>> geopos(String key, String... members);
Response<List<GeoRadiusResponse>> georadius(String key, double longitude, double latitude,
double radius, GeoUnit unit);
Response<List<GeoRadiusResponse>> georadiusReadonly(String key, double longitude, double latitude,
double radius, GeoUnit unit);
Response<List<GeoRadiusResponse>> georadius(String key, double longitude, double latitude,
double radius, GeoUnit unit, GeoRadiusParam param);
Response<List<GeoRadiusResponse>> georadiusReadonly(String key, double longitude, double latitude,
double radius, GeoUnit unit, GeoRadiusParam param);
Response<List<GeoRadiusResponse>> georadiusByMember(String key, String member, double radius,
GeoUnit unit);
Response<List<GeoRadiusResponse>> georadiusByMemberReadonly(String key, String member, double radius,
GeoUnit unit);
Response<List<GeoRadiusResponse>> georadiusByMember(String key, String member, double radius,
GeoUnit unit, GeoRadiusParam param);
Response<List<GeoRadiusResponse>> georadiusByMemberReadonly(String key, String member, double radius,
GeoUnit unit, GeoRadiusParam param);
Response<StreamEntryID> xadd(String key, StreamEntryID id, Map<String, String> hash);
Response<StreamEntryID> xadd(String key, StreamEntryID id, Map<String, String> hash, long maxLen, boolean approximateLength);
Response<Long> xlen(String key);
Response<List<StreamEntry>> xrange(String key, StreamEntryID start, StreamEntryID end, int count);
Response<List<StreamEntry>> xrevrange(String key, StreamEntryID end, StreamEntryID start, int count);
Response<Long> xack(String key, String group, StreamEntryID... ids);
Response<String> xgroupCreate( String key, String groupname, StreamEntryID id, boolean makeStream);
Response<String> xgroupSetID( String key, String groupname, StreamEntryID id);
Response<Long> xgroupDestroy( String key, String groupname);
Response<String> xgroupDelConsumer( String key, String groupname, String consumername);
Response<List<StreamPendingEntry>> xpending(String key, String groupname, StreamEntryID start, StreamEntryID end, int count, String consumername);
Response<Long> xdel( String key, StreamEntryID... ids);
Response<Long> xtrim( String key, long maxLen, boolean approximateLength);
Response<List<StreamEntry>> xclaim( String key, String group, String consumername, long minIdleTime,
long newIdleTime, int retries, boolean force, StreamEntryID... ids);
Response<Long> bitpos(String key, boolean value);
Response<Long> bitpos(String key, boolean value, BitPosParams params);
Response<String> set(String key, String value, SetParams params);
Response<List<String>> srandmember(String key, int count);
Response<Set<Tuple>> zrangeByScoreWithScores(String key, String min, String max);
Response<Set<Tuple>> zrangeByScoreWithScores(String key, String min, String max, int offset,
int count);
Response<Long> objectRefcount(String key);
Response<String> objectEncoding(String key);
Response<Long> objectIdletime(String key);
Response<Double> incrByFloat(String key, double increment);
Response<String> psetex(String key, long milliseconds, String value);
Response<Double> hincrByFloat(String key, String field, double increment);
}