/src/play/modules/redis/Redis.java

https://github.com/jonhelgi/play-redis · Java · 1216 lines · 1031 code · 177 blank · 8 comment · 166 complexity · fb1e4d144ffcfc96ce9c736eb5633cb9 MD5 · raw file

  1. package play.modules.redis;
  2. import redis.clients.jedis.Jedis;
  3. import redis.clients.jedis.exceptions.JedisConnectionException;
  4. /**
  5. * Redis connector for the Play framework.
  6. *
  7. * **DO NOT EDIT**. This class was auto-generated.
  8. * See play.modules.redis.generator.RedisGenerator.
  9. *
  10. * @author Tim Kral
  11. **/
  12. public class Redis {
  13. public static java.lang.Long append(java.lang.String key,java.lang.String value) {
  14. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  15. return jedis.append(key,value);
  16. }
  17. public static java.lang.Long append(byte[] key,byte[] value) {
  18. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  19. return jedis.append(key,value);
  20. }
  21. public static java.lang.String auth(java.lang.String password) {
  22. if (!RedisConnectionManager.isSharded()) {
  23. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  24. return jedis.auth(password);
  25. } else {
  26. throw new JedisConnectionException("Cannot execute auth with sharded instance.");
  27. }
  28. }
  29. public static java.lang.String bgrewriteaof() {
  30. if (!RedisConnectionManager.isSharded()) {
  31. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  32. return jedis.bgrewriteaof();
  33. } else {
  34. throw new JedisConnectionException("Cannot execute bgrewriteaof with sharded instance.");
  35. }
  36. }
  37. public static java.lang.String bgsave() {
  38. if (!RedisConnectionManager.isSharded()) {
  39. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  40. return jedis.bgsave();
  41. } else {
  42. throw new JedisConnectionException("Cannot execute bgsave with sharded instance.");
  43. }
  44. }
  45. public static java.util.List blpop(int timeout,java.lang.String[] keys) {
  46. if (!RedisConnectionManager.isSharded()) {
  47. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  48. return jedis.blpop(timeout,keys);
  49. } else {
  50. throw new JedisConnectionException("Cannot execute blpop with sharded instance.");
  51. }
  52. }
  53. public static java.util.List blpop(int timeout,byte[][] keys) {
  54. if (!RedisConnectionManager.isSharded()) {
  55. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  56. return jedis.blpop(timeout,keys);
  57. } else {
  58. throw new JedisConnectionException("Cannot execute blpop with sharded instance.");
  59. }
  60. }
  61. public static java.util.List brpop(int timeout,java.lang.String[] keys) {
  62. if (!RedisConnectionManager.isSharded()) {
  63. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  64. return jedis.brpop(timeout,keys);
  65. } else {
  66. throw new JedisConnectionException("Cannot execute brpop with sharded instance.");
  67. }
  68. }
  69. public static java.util.List brpop(int timeout,byte[][] keys) {
  70. if (!RedisConnectionManager.isSharded()) {
  71. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  72. return jedis.brpop(timeout,keys);
  73. } else {
  74. throw new JedisConnectionException("Cannot execute brpop with sharded instance.");
  75. }
  76. }
  77. public static byte[] brpoplpush(byte[] source,byte[] destination,int timeout) {
  78. if (!RedisConnectionManager.isSharded()) {
  79. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  80. return jedis.brpoplpush(source,destination,timeout);
  81. } else {
  82. throw new JedisConnectionException("Cannot execute brpoplpush with sharded instance.");
  83. }
  84. }
  85. public static java.lang.String brpoplpush(java.lang.String source,java.lang.String destination,int timeout) {
  86. if (!RedisConnectionManager.isSharded()) {
  87. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  88. return jedis.brpoplpush(source,destination,timeout);
  89. } else {
  90. throw new JedisConnectionException("Cannot execute brpoplpush with sharded instance.");
  91. }
  92. }
  93. public static java.util.List configGet(java.lang.String pattern) {
  94. if (!RedisConnectionManager.isSharded()) {
  95. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  96. return jedis.configGet(pattern);
  97. } else {
  98. throw new JedisConnectionException("Cannot execute configGet with sharded instance.");
  99. }
  100. }
  101. public static java.lang.String configResetStat() {
  102. if (!RedisConnectionManager.isSharded()) {
  103. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  104. return jedis.configResetStat();
  105. } else {
  106. throw new JedisConnectionException("Cannot execute configResetStat with sharded instance.");
  107. }
  108. }
  109. public static java.lang.String configSet(java.lang.String parameter,java.lang.String value) {
  110. if (!RedisConnectionManager.isSharded()) {
  111. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  112. return jedis.configSet(parameter,value);
  113. } else {
  114. throw new JedisConnectionException("Cannot execute configSet with sharded instance.");
  115. }
  116. }
  117. public static void connect() {
  118. if (!RedisConnectionManager.isSharded()) {
  119. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  120. jedis.connect();
  121. } else {
  122. throw new JedisConnectionException("Cannot execute connect with sharded instance.");
  123. }
  124. }
  125. public static java.lang.Long dbSize() {
  126. if (!RedisConnectionManager.isSharded()) {
  127. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  128. return jedis.dbSize();
  129. } else {
  130. throw new JedisConnectionException("Cannot execute dbSize with sharded instance.");
  131. }
  132. }
  133. public static java.lang.String debug(redis.clients.jedis.DebugParams params) {
  134. if (!RedisConnectionManager.isSharded()) {
  135. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  136. return jedis.debug(params);
  137. } else {
  138. throw new JedisConnectionException("Cannot execute debug with sharded instance.");
  139. }
  140. }
  141. public static java.lang.Long decr(byte[] key) {
  142. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  143. return jedis.decr(key);
  144. }
  145. public static java.lang.Long decr(java.lang.String key) {
  146. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  147. return jedis.decr(key);
  148. }
  149. public static java.lang.Long decrBy(byte[] key,long integer) {
  150. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  151. return jedis.decrBy(key,integer);
  152. }
  153. public static java.lang.Long decrBy(java.lang.String key,long integer) {
  154. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  155. return jedis.decrBy(key,integer);
  156. }
  157. public static java.lang.Long del(java.lang.String[] keys) {
  158. if (!RedisConnectionManager.isSharded()) {
  159. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  160. return jedis.del(keys);
  161. } else {
  162. throw new JedisConnectionException("Cannot execute del with sharded instance.");
  163. }
  164. }
  165. public static java.lang.Long del(byte[][] keys) {
  166. if (!RedisConnectionManager.isSharded()) {
  167. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  168. return jedis.del(keys);
  169. } else {
  170. throw new JedisConnectionException("Cannot execute del with sharded instance.");
  171. }
  172. }
  173. public static byte[] echo(byte[] string) {
  174. if (!RedisConnectionManager.isSharded()) {
  175. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  176. return jedis.echo(string);
  177. } else {
  178. throw new JedisConnectionException("Cannot execute echo with sharded instance.");
  179. }
  180. }
  181. public static java.lang.String echo(java.lang.String string) {
  182. if (!RedisConnectionManager.isSharded()) {
  183. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  184. return jedis.echo(string);
  185. } else {
  186. throw new JedisConnectionException("Cannot execute echo with sharded instance.");
  187. }
  188. }
  189. public static java.lang.Boolean exists(java.lang.String key) {
  190. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  191. return jedis.exists(key);
  192. }
  193. public static java.lang.Boolean exists(byte[] key) {
  194. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  195. return jedis.exists(key);
  196. }
  197. public static java.lang.Long expire(java.lang.String key,int seconds) {
  198. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  199. return jedis.expire(key,seconds);
  200. }
  201. public static java.lang.Long expire(byte[] key,int seconds) {
  202. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  203. return jedis.expire(key,seconds);
  204. }
  205. public static java.lang.Long expireAt(byte[] key,long unixTime) {
  206. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  207. return jedis.expireAt(key,unixTime);
  208. }
  209. public static java.lang.Long expireAt(java.lang.String key,long unixTime) {
  210. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  211. return jedis.expireAt(key,unixTime);
  212. }
  213. public static java.lang.String flushAll() {
  214. if (!RedisConnectionManager.isSharded()) {
  215. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  216. return jedis.flushAll();
  217. } else {
  218. throw new JedisConnectionException("Cannot execute flushAll with sharded instance.");
  219. }
  220. }
  221. public static java.lang.String flushDB() {
  222. if (!RedisConnectionManager.isSharded()) {
  223. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  224. return jedis.flushDB();
  225. } else {
  226. throw new JedisConnectionException("Cannot execute flushDB with sharded instance.");
  227. }
  228. }
  229. public static java.lang.String get(java.lang.String key) {
  230. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  231. return jedis.get(key);
  232. }
  233. public static byte[] get(byte[] key) {
  234. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  235. return jedis.get(key);
  236. }
  237. public static redis.clients.jedis.Client getClient() {
  238. if (!RedisConnectionManager.isSharded()) {
  239. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  240. return jedis.getClient();
  241. } else {
  242. throw new JedisConnectionException("Cannot execute getClient with sharded instance.");
  243. }
  244. }
  245. public static java.lang.Long getDB() {
  246. if (!RedisConnectionManager.isSharded()) {
  247. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  248. return jedis.getDB();
  249. } else {
  250. throw new JedisConnectionException("Cannot execute getDB with sharded instance.");
  251. }
  252. }
  253. public static byte[] getSet(byte[] key,byte[] value) {
  254. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  255. return jedis.getSet(key,value);
  256. }
  257. public static java.lang.String getSet(java.lang.String key,java.lang.String value) {
  258. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  259. return jedis.getSet(key,value);
  260. }
  261. public static boolean getbit(java.lang.String key,long offset) {
  262. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  263. return jedis.getbit(key,offset);
  264. }
  265. public static java.lang.Long getbit(byte[] key,long offset) {
  266. if (!RedisConnectionManager.isSharded()) {
  267. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  268. return jedis.getbit(key,offset);
  269. } else {
  270. throw new JedisConnectionException("Cannot execute getbit with sharded instance.");
  271. }
  272. }
  273. public static java.lang.String getrange(java.lang.String key,long startOffset,long endOffset) {
  274. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  275. return jedis.getrange(key,startOffset,endOffset);
  276. }
  277. public static java.lang.String getrange(byte[] key,long startOffset,long endOffset) {
  278. if (!RedisConnectionManager.isSharded()) {
  279. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  280. return jedis.getrange(key,startOffset,endOffset);
  281. } else {
  282. throw new JedisConnectionException("Cannot execute getrange with sharded instance.");
  283. }
  284. }
  285. public static java.lang.Long hdel(byte[] key,byte[] field) {
  286. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  287. return jedis.hdel(key,field);
  288. }
  289. public static java.lang.Long hdel(java.lang.String key,java.lang.String field) {
  290. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  291. return jedis.hdel(key,field);
  292. }
  293. public static java.lang.Boolean hexists(java.lang.String key,java.lang.String field) {
  294. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  295. return jedis.hexists(key,field);
  296. }
  297. public static java.lang.Boolean hexists(byte[] key,byte[] field) {
  298. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  299. return jedis.hexists(key,field);
  300. }
  301. public static byte[] hget(byte[] key,byte[] field) {
  302. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  303. return jedis.hget(key,field);
  304. }
  305. public static java.lang.String hget(java.lang.String key,java.lang.String field) {
  306. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  307. return jedis.hget(key,field);
  308. }
  309. public static java.util.Map hgetAll(java.lang.String key) {
  310. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  311. return jedis.hgetAll(key);
  312. }
  313. public static java.util.Map hgetAll(byte[] key) {
  314. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  315. return jedis.hgetAll(key);
  316. }
  317. public static java.lang.Long hincrBy(java.lang.String key,java.lang.String field,long value) {
  318. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  319. return jedis.hincrBy(key,field,value);
  320. }
  321. public static java.lang.Long hincrBy(byte[] key,byte[] field,long value) {
  322. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  323. return jedis.hincrBy(key,field,value);
  324. }
  325. public static java.util.Set hkeys(byte[] key) {
  326. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  327. return jedis.hkeys(key);
  328. }
  329. public static java.util.Set hkeys(java.lang.String key) {
  330. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  331. return jedis.hkeys(key);
  332. }
  333. public static java.lang.Long hlen(java.lang.String key) {
  334. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  335. return jedis.hlen(key);
  336. }
  337. public static java.lang.Long hlen(byte[] key) {
  338. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  339. return jedis.hlen(key);
  340. }
  341. public static java.util.List hmget(java.lang.String key,java.lang.String[] fields) {
  342. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  343. return jedis.hmget(key,fields);
  344. }
  345. public static java.util.List hmget(byte[] key,byte[][] fields) {
  346. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  347. return jedis.hmget(key,fields);
  348. }
  349. public static java.lang.String hmset(java.lang.String key,java.util.Map hash) {
  350. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  351. return jedis.hmset(key,hash);
  352. }
  353. public static java.lang.String hmset(byte[] key,java.util.Map hash) {
  354. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  355. return jedis.hmset(key,hash);
  356. }
  357. public static java.lang.Long hset(byte[] key,byte[] field,byte[] value) {
  358. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  359. return jedis.hset(key,field,value);
  360. }
  361. public static java.lang.Long hset(java.lang.String key,java.lang.String field,java.lang.String value) {
  362. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  363. return jedis.hset(key,field,value);
  364. }
  365. public static java.lang.Long hsetnx(java.lang.String key,java.lang.String field,java.lang.String value) {
  366. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  367. return jedis.hsetnx(key,field,value);
  368. }
  369. public static java.lang.Long hsetnx(byte[] key,byte[] field,byte[] value) {
  370. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  371. return jedis.hsetnx(key,field,value);
  372. }
  373. public static java.util.Collection hvals(byte[] x0) {
  374. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(x0);
  375. return jedis.hvals(x0);
  376. }
  377. public static java.util.List hvals(java.lang.String key) {
  378. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  379. return jedis.hvals(key);
  380. }
  381. public static java.lang.Long incr(byte[] key) {
  382. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  383. return jedis.incr(key);
  384. }
  385. public static java.lang.Long incr(java.lang.String key) {
  386. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  387. return jedis.incr(key);
  388. }
  389. public static java.lang.Long incrBy(java.lang.String key,long integer) {
  390. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  391. return jedis.incrBy(key,integer);
  392. }
  393. public static java.lang.Long incrBy(byte[] key,long integer) {
  394. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  395. return jedis.incrBy(key,integer);
  396. }
  397. public static java.lang.String info() {
  398. if (!RedisConnectionManager.isSharded()) {
  399. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  400. return jedis.info();
  401. } else {
  402. throw new JedisConnectionException("Cannot execute info with sharded instance.");
  403. }
  404. }
  405. public static boolean isConnected() {
  406. if (!RedisConnectionManager.isSharded()) {
  407. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  408. return jedis.isConnected();
  409. } else {
  410. throw new JedisConnectionException("Cannot execute isConnected with sharded instance.");
  411. }
  412. }
  413. public static java.util.Set keys(byte[] pattern) {
  414. if (!RedisConnectionManager.isSharded()) {
  415. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  416. return jedis.keys(pattern);
  417. } else {
  418. throw new JedisConnectionException("Cannot execute keys with sharded instance.");
  419. }
  420. }
  421. public static java.util.Set keys(java.lang.String pattern) {
  422. if (!RedisConnectionManager.isSharded()) {
  423. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  424. return jedis.keys(pattern);
  425. } else {
  426. throw new JedisConnectionException("Cannot execute keys with sharded instance.");
  427. }
  428. }
  429. public static java.lang.Long lastsave() {
  430. if (!RedisConnectionManager.isSharded()) {
  431. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  432. return jedis.lastsave();
  433. } else {
  434. throw new JedisConnectionException("Cannot execute lastsave with sharded instance.");
  435. }
  436. }
  437. public static byte[] lindex(byte[] key,int index) {
  438. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  439. return jedis.lindex(key,index);
  440. }
  441. public static java.lang.String lindex(java.lang.String key,long index) {
  442. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  443. return jedis.lindex(key,index);
  444. }
  445. public static java.lang.Long linsert(byte[] key,redis.clients.jedis.BinaryClient.LIST_POSITION where,byte[] pivot,byte[] value) {
  446. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  447. return jedis.linsert(key,where,pivot,value);
  448. }
  449. public static java.lang.Long linsert(java.lang.String key,redis.clients.jedis.BinaryClient.LIST_POSITION where,java.lang.String pivot,java.lang.String value) {
  450. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  451. return jedis.linsert(key,where,pivot,value);
  452. }
  453. public static java.lang.Long llen(byte[] key) {
  454. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  455. return jedis.llen(key);
  456. }
  457. public static java.lang.Long llen(java.lang.String key) {
  458. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  459. return jedis.llen(key);
  460. }
  461. public static java.lang.String lpop(java.lang.String key) {
  462. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  463. return jedis.lpop(key);
  464. }
  465. public static byte[] lpop(byte[] key) {
  466. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  467. return jedis.lpop(key);
  468. }
  469. public static java.lang.Long lpush(java.lang.String key,java.lang.String string) {
  470. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  471. return jedis.lpush(key,string);
  472. }
  473. public static java.lang.Long lpush(byte[] key,byte[] string) {
  474. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  475. return jedis.lpush(key,string);
  476. }
  477. public static java.lang.Long lpushx(java.lang.String key,java.lang.String string) {
  478. if (!RedisConnectionManager.isSharded()) {
  479. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  480. return jedis.lpushx(key,string);
  481. } else {
  482. throw new JedisConnectionException("Cannot execute lpushx with sharded instance.");
  483. }
  484. }
  485. public static java.lang.Long lpushx(byte[] key,byte[] string) {
  486. if (!RedisConnectionManager.isSharded()) {
  487. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  488. return jedis.lpushx(key,string);
  489. } else {
  490. throw new JedisConnectionException("Cannot execute lpushx with sharded instance.");
  491. }
  492. }
  493. public static java.util.List lrange(java.lang.String key,long start,long end) {
  494. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  495. return jedis.lrange(key,start,end);
  496. }
  497. public static java.util.List lrange(byte[] key,int start,int end) {
  498. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  499. return jedis.lrange(key,start,end);
  500. }
  501. public static java.lang.Long lrem(java.lang.String key,long count,java.lang.String value) {
  502. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  503. return jedis.lrem(key,count,value);
  504. }
  505. public static java.lang.Long lrem(byte[] key,int count,byte[] value) {
  506. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  507. return jedis.lrem(key,count,value);
  508. }
  509. public static java.lang.String lset(java.lang.String key,long index,java.lang.String value) {
  510. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  511. return jedis.lset(key,index,value);
  512. }
  513. public static java.lang.String lset(byte[] key,int index,byte[] value) {
  514. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  515. return jedis.lset(key,index,value);
  516. }
  517. public static java.lang.String ltrim(java.lang.String key,long start,long end) {
  518. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  519. return jedis.ltrim(key,start,end);
  520. }
  521. public static java.lang.String ltrim(byte[] key,int start,int end) {
  522. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  523. return jedis.ltrim(key,start,end);
  524. }
  525. public static java.util.List mget(byte[][] keys) {
  526. if (!RedisConnectionManager.isSharded()) {
  527. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  528. return jedis.mget(keys);
  529. } else {
  530. throw new JedisConnectionException("Cannot execute mget with sharded instance.");
  531. }
  532. }
  533. public static java.util.List mget(java.lang.String[] keys) {
  534. if (!RedisConnectionManager.isSharded()) {
  535. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  536. return jedis.mget(keys);
  537. } else {
  538. throw new JedisConnectionException("Cannot execute mget with sharded instance.");
  539. }
  540. }
  541. public static void monitor(redis.clients.jedis.JedisMonitor jedisMonitor) {
  542. if (!RedisConnectionManager.isSharded()) {
  543. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  544. jedis.monitor(jedisMonitor);
  545. } else {
  546. throw new JedisConnectionException("Cannot execute monitor with sharded instance.");
  547. }
  548. }
  549. public static java.lang.Long move(java.lang.String key,int dbIndex) {
  550. if (!RedisConnectionManager.isSharded()) {
  551. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  552. return jedis.move(key,dbIndex);
  553. } else {
  554. throw new JedisConnectionException("Cannot execute move with sharded instance.");
  555. }
  556. }
  557. public static java.lang.Long move(byte[] key,int dbIndex) {
  558. if (!RedisConnectionManager.isSharded()) {
  559. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  560. return jedis.move(key,dbIndex);
  561. } else {
  562. throw new JedisConnectionException("Cannot execute move with sharded instance.");
  563. }
  564. }
  565. public static java.lang.String mset(java.lang.String[] keysvalues) {
  566. if (!RedisConnectionManager.isSharded()) {
  567. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  568. return jedis.mset(keysvalues);
  569. } else {
  570. throw new JedisConnectionException("Cannot execute mset with sharded instance.");
  571. }
  572. }
  573. public static java.lang.String mset(byte[][] keysvalues) {
  574. if (!RedisConnectionManager.isSharded()) {
  575. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  576. return jedis.mset(keysvalues);
  577. } else {
  578. throw new JedisConnectionException("Cannot execute mset with sharded instance.");
  579. }
  580. }
  581. public static java.lang.Long msetnx(java.lang.String[] keysvalues) {
  582. if (!RedisConnectionManager.isSharded()) {
  583. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  584. return jedis.msetnx(keysvalues);
  585. } else {
  586. throw new JedisConnectionException("Cannot execute msetnx with sharded instance.");
  587. }
  588. }
  589. public static java.lang.Long msetnx(byte[][] keysvalues) {
  590. if (!RedisConnectionManager.isSharded()) {
  591. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  592. return jedis.msetnx(keysvalues);
  593. } else {
  594. throw new JedisConnectionException("Cannot execute msetnx with sharded instance.");
  595. }
  596. }
  597. public static redis.clients.jedis.Transaction multi() {
  598. if (!RedisConnectionManager.isSharded()) {
  599. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  600. return jedis.multi();
  601. } else {
  602. throw new JedisConnectionException("Cannot execute multi with sharded instance.");
  603. }
  604. }
  605. public static java.util.List multi(redis.clients.jedis.TransactionBlock jedisTransaction) {
  606. if (!RedisConnectionManager.isSharded()) {
  607. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  608. return jedis.multi(jedisTransaction);
  609. } else {
  610. throw new JedisConnectionException("Cannot execute multi with sharded instance.");
  611. }
  612. }
  613. public static java.lang.Long persist(byte[] key) {
  614. if (!RedisConnectionManager.isSharded()) {
  615. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  616. return jedis.persist(key);
  617. } else {
  618. throw new JedisConnectionException("Cannot execute persist with sharded instance.");
  619. }
  620. }
  621. public static java.lang.Long persist(java.lang.String key) {
  622. if (!RedisConnectionManager.isSharded()) {
  623. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  624. return jedis.persist(key);
  625. } else {
  626. throw new JedisConnectionException("Cannot execute persist with sharded instance.");
  627. }
  628. }
  629. public static java.lang.String ping() {
  630. if (!RedisConnectionManager.isSharded()) {
  631. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  632. return jedis.ping();
  633. } else {
  634. throw new JedisConnectionException("Cannot execute ping with sharded instance.");
  635. }
  636. }
  637. public static redis.clients.jedis.Pipeline pipelined() {
  638. if (!RedisConnectionManager.isSharded()) {
  639. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  640. return jedis.pipelined();
  641. } else {
  642. throw new JedisConnectionException("Cannot execute pipelined with sharded instance.");
  643. }
  644. }
  645. public static java.util.List pipelined(redis.clients.jedis.PipelineBlock jedisPipeline) {
  646. if (!RedisConnectionManager.isSharded()) {
  647. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  648. return jedis.pipelined(jedisPipeline);
  649. } else {
  650. throw new JedisConnectionException("Cannot execute pipelined with sharded instance.");
  651. }
  652. }
  653. public static void psubscribe(redis.clients.jedis.BinaryJedisPubSub jedisPubSub,byte[][] patterns) {
  654. if (!RedisConnectionManager.isSharded()) {
  655. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  656. jedis.psubscribe(jedisPubSub,patterns);
  657. } else {
  658. throw new JedisConnectionException("Cannot execute psubscribe with sharded instance.");
  659. }
  660. }
  661. public static void psubscribe(redis.clients.jedis.JedisPubSub jedisPubSub,java.lang.String[] patterns) {
  662. if (!RedisConnectionManager.isSharded()) {
  663. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  664. jedis.psubscribe(jedisPubSub,patterns);
  665. } else {
  666. throw new JedisConnectionException("Cannot execute psubscribe with sharded instance.");
  667. }
  668. }
  669. public static java.lang.Long publish(byte[] channel,byte[] message) {
  670. if (!RedisConnectionManager.isSharded()) {
  671. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  672. return jedis.publish(channel,message);
  673. } else {
  674. throw new JedisConnectionException("Cannot execute publish with sharded instance.");
  675. }
  676. }
  677. public static java.lang.Long publish(java.lang.String channel,java.lang.String message) {
  678. if (!RedisConnectionManager.isSharded()) {
  679. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  680. return jedis.publish(channel,message);
  681. } else {
  682. throw new JedisConnectionException("Cannot execute publish with sharded instance.");
  683. }
  684. }
  685. public static byte[] randomBinaryKey() {
  686. if (!RedisConnectionManager.isSharded()) {
  687. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  688. return jedis.randomBinaryKey();
  689. } else {
  690. throw new JedisConnectionException("Cannot execute randomBinaryKey with sharded instance.");
  691. }
  692. }
  693. public static java.lang.String randomKey() {
  694. if (!RedisConnectionManager.isSharded()) {
  695. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  696. return jedis.randomKey();
  697. } else {
  698. throw new JedisConnectionException("Cannot execute randomKey with sharded instance.");
  699. }
  700. }
  701. public static java.lang.String rename(java.lang.String oldkey,java.lang.String newkey) {
  702. if (!RedisConnectionManager.isSharded()) {
  703. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  704. return jedis.rename(oldkey,newkey);
  705. } else {
  706. throw new JedisConnectionException("Cannot execute rename with sharded instance.");
  707. }
  708. }
  709. public static java.lang.String rename(byte[] oldkey,byte[] newkey) {
  710. if (!RedisConnectionManager.isSharded()) {
  711. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  712. return jedis.rename(oldkey,newkey);
  713. } else {
  714. throw new JedisConnectionException("Cannot execute rename with sharded instance.");
  715. }
  716. }
  717. public static java.lang.Long renamenx(byte[] oldkey,byte[] newkey) {
  718. if (!RedisConnectionManager.isSharded()) {
  719. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  720. return jedis.renamenx(oldkey,newkey);
  721. } else {
  722. throw new JedisConnectionException("Cannot execute renamenx with sharded instance.");
  723. }
  724. }
  725. public static java.lang.Long renamenx(java.lang.String oldkey,java.lang.String newkey) {
  726. if (!RedisConnectionManager.isSharded()) {
  727. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  728. return jedis.renamenx(oldkey,newkey);
  729. } else {
  730. throw new JedisConnectionException("Cannot execute renamenx with sharded instance.");
  731. }
  732. }
  733. public static java.lang.String rpop(java.lang.String key) {
  734. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  735. return jedis.rpop(key);
  736. }
  737. public static byte[] rpop(byte[] key) {
  738. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  739. return jedis.rpop(key);
  740. }
  741. public static java.lang.String rpoplpush(java.lang.String srckey,java.lang.String dstkey) {
  742. if (!RedisConnectionManager.isSharded()) {
  743. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  744. return jedis.rpoplpush(srckey,dstkey);
  745. } else {
  746. throw new JedisConnectionException("Cannot execute rpoplpush with sharded instance.");
  747. }
  748. }
  749. public static byte[] rpoplpush(byte[] srckey,byte[] dstkey) {
  750. if (!RedisConnectionManager.isSharded()) {
  751. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  752. return jedis.rpoplpush(srckey,dstkey);
  753. } else {
  754. throw new JedisConnectionException("Cannot execute rpoplpush with sharded instance.");
  755. }
  756. }
  757. public static java.lang.Long rpush(byte[] key,byte[] string) {
  758. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  759. return jedis.rpush(key,string);
  760. }
  761. public static java.lang.Long rpush(java.lang.String key,java.lang.String string) {
  762. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  763. return jedis.rpush(key,string);
  764. }
  765. public static java.lang.Long rpushx(java.lang.String key,java.lang.String string) {
  766. if (!RedisConnectionManager.isSharded()) {
  767. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  768. return jedis.rpushx(key,string);
  769. } else {
  770. throw new JedisConnectionException("Cannot execute rpushx with sharded instance.");
  771. }
  772. }
  773. public static java.lang.Long rpushx(byte[] key,byte[] string) {
  774. if (!RedisConnectionManager.isSharded()) {
  775. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  776. return jedis.rpushx(key,string);
  777. } else {
  778. throw new JedisConnectionException("Cannot execute rpushx with sharded instance.");
  779. }
  780. }
  781. public static java.lang.Long sadd(java.lang.String key,java.lang.String member) {
  782. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  783. return jedis.sadd(key,member);
  784. }
  785. public static java.lang.Long sadd(byte[] key,byte[] member) {
  786. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  787. return jedis.sadd(key,member);
  788. }
  789. public static java.lang.String save() {
  790. if (!RedisConnectionManager.isSharded()) {
  791. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  792. return jedis.save();
  793. } else {
  794. throw new JedisConnectionException("Cannot execute save with sharded instance.");
  795. }
  796. }
  797. public static java.lang.Long scard(java.lang.String key) {
  798. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  799. return jedis.scard(key);
  800. }
  801. public static java.lang.Long scard(byte[] key) {
  802. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  803. return jedis.scard(key);
  804. }
  805. public static java.util.Set sdiff(byte[][] keys) {
  806. if (!RedisConnectionManager.isSharded()) {
  807. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  808. return jedis.sdiff(keys);
  809. } else {
  810. throw new JedisConnectionException("Cannot execute sdiff with sharded instance.");
  811. }
  812. }
  813. public static java.util.Set sdiff(java.lang.String[] keys) {
  814. if (!RedisConnectionManager.isSharded()) {
  815. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  816. return jedis.sdiff(keys);
  817. } else {
  818. throw new JedisConnectionException("Cannot execute sdiff with sharded instance.");
  819. }
  820. }
  821. public static java.lang.Long sdiffstore(java.lang.String dstkey,java.lang.String[] keys) {
  822. if (!RedisConnectionManager.isSharded()) {
  823. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  824. return jedis.sdiffstore(dstkey,keys);
  825. } else {
  826. throw new JedisConnectionException("Cannot execute sdiffstore with sharded instance.");
  827. }
  828. }
  829. public static java.lang.Long sdiffstore(byte[] dstkey,byte[][] keys) {
  830. if (!RedisConnectionManager.isSharded()) {
  831. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  832. return jedis.sdiffstore(dstkey,keys);
  833. } else {
  834. throw new JedisConnectionException("Cannot execute sdiffstore with sharded instance.");
  835. }
  836. }
  837. public static java.lang.String select(int index) {
  838. if (!RedisConnectionManager.isSharded()) {
  839. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  840. return jedis.select(index);
  841. } else {
  842. throw new JedisConnectionException("Cannot execute select with sharded instance.");
  843. }
  844. }
  845. public static java.lang.String set(byte[] key,byte[] value) {
  846. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  847. return jedis.set(key,value);
  848. }
  849. public static java.lang.String set(java.lang.String key,java.lang.String value) {
  850. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  851. return jedis.set(key,value);
  852. }
  853. public static java.lang.Long setbit(byte[] key,long offset,byte[] value) {
  854. if (!RedisConnectionManager.isSharded()) {
  855. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  856. return jedis.setbit(key,offset,value);
  857. } else {
  858. throw new JedisConnectionException("Cannot execute setbit with sharded instance.");
  859. }
  860. }
  861. public static boolean setbit(java.lang.String key,long offset,boolean value) {
  862. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  863. return jedis.setbit(key,offset,value);
  864. }
  865. public static java.lang.String setex(java.lang.String key,int seconds,java.lang.String value) {
  866. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  867. return jedis.setex(key,seconds,value);
  868. }
  869. public static java.lang.String setex(byte[] key,int seconds,byte[] value) {
  870. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  871. return jedis.setex(key,seconds,value);
  872. }
  873. public static java.lang.Long setnx(java.lang.String key,java.lang.String value) {
  874. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  875. return jedis.setnx(key,value);
  876. }
  877. public static java.lang.Long setnx(byte[] key,byte[] value) {
  878. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  879. return jedis.setnx(key,value);
  880. }
  881. public static long setrange(byte[] key,long offset,byte[] value) {
  882. if (!RedisConnectionManager.isSharded()) {
  883. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  884. return jedis.setrange(key,offset,value);
  885. } else {
  886. throw new JedisConnectionException("Cannot execute setrange with sharded instance.");
  887. }
  888. }
  889. public static long setrange(java.lang.String key,long offset,java.lang.String value) {
  890. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  891. return jedis.setrange(key,offset,value);
  892. }
  893. public static java.lang.String shutdown() {
  894. if (!RedisConnectionManager.isSharded()) {
  895. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  896. return jedis.shutdown();
  897. } else {
  898. throw new JedisConnectionException("Cannot execute shutdown with sharded instance.");
  899. }
  900. }
  901. public static java.util.Set sinter(java.lang.String[] keys) {
  902. if (!RedisConnectionManager.isSharded()) {
  903. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  904. return jedis.sinter(keys);
  905. } else {
  906. throw new JedisConnectionException("Cannot execute sinter with sharded instance.");
  907. }
  908. }
  909. public static java.util.Set sinter(byte[][] keys) {
  910. if (!RedisConnectionManager.isSharded()) {
  911. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  912. return jedis.sinter(keys);
  913. } else {
  914. throw new JedisConnectionException("Cannot execute sinter with sharded instance.");
  915. }
  916. }
  917. public static java.lang.Long sinterstore(java.lang.String dstkey,java.lang.String[] keys) {
  918. if (!RedisConnectionManager.isSharded()) {
  919. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  920. return jedis.sinterstore(dstkey,keys);
  921. } else {
  922. throw new JedisConnectionException("Cannot execute sinterstore with sharded instance.");
  923. }
  924. }
  925. public static java.lang.Long sinterstore(byte[] dstkey,byte[][] keys) {
  926. if (!RedisConnectionManager.isSharded()) {
  927. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  928. return jedis.sinterstore(dstkey,keys);
  929. } else {
  930. throw new JedisConnectionException("Cannot execute sinterstore with sharded instance.");
  931. }
  932. }
  933. public static java.lang.Boolean sismember(java.lang.String key,java.lang.String member) {
  934. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  935. return jedis.sismember(key,member);
  936. }
  937. public static java.lang.Boolean sismember(byte[] key,byte[] member) {
  938. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  939. return jedis.sismember(key,member);
  940. }
  941. public static java.lang.String slaveof(java.lang.String host,int port) {
  942. if (!RedisConnectionManager.isSharded()) {
  943. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  944. return jedis.slaveof(host,port);
  945. } else {
  946. throw new JedisConnectionException("Cannot execute slaveof with sharded instance.");
  947. }
  948. }
  949. public static java.lang.String slaveofNoOne() {
  950. if (!RedisConnectionManager.isSharded()) {
  951. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  952. return jedis.slaveofNoOne();
  953. } else {
  954. throw new JedisConnectionException("Cannot execute slaveofNoOne with sharded instance.");
  955. }
  956. }
  957. public static java.util.Set smembers(byte[] key) {
  958. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  959. return jedis.smembers(key);
  960. }
  961. public static java.util.Set smembers(java.lang.String key) {
  962. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  963. return jedis.smembers(key);
  964. }
  965. public static java.lang.Long smove(byte[] srckey,byte[] dstkey,byte[] member) {
  966. if (!RedisConnectionManager.isSharded()) {
  967. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  968. return jedis.smove(srckey,dstkey,member);
  969. } else {
  970. throw new JedisConnectionException("Cannot execute smove with sharded instance.");
  971. }
  972. }
  973. public static java.lang.Long smove(java.lang.String srckey,java.lang.String dstkey,java.lang.String member) {
  974. if (!RedisConnectionManager.isSharded()) {
  975. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  976. return jedis.smove(srckey,dstkey,member);
  977. } else {
  978. throw new JedisConnectionException("Cannot execute smove with sharded instance.");
  979. }
  980. }
  981. public static java.util.List sort(java.lang.String key) {
  982. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  983. return jedis.sort(key);
  984. }
  985. public static java.util.List sort(byte[] key) {
  986. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  987. return jedis.sort(key);
  988. }
  989. public static java.util.List sort(java.lang.String key,redis.clients.jedis.SortingParams sortingParameters) {
  990. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  991. return jedis.sort(key,sortingParameters);
  992. }
  993. public static java.lang.Long sort(java.lang.String key,java.lang.String dstkey) {
  994. if (!RedisConnectionManager.isSharded()) {
  995. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  996. return jedis.sort(key,dstkey);
  997. } else {
  998. throw new JedisConnectionException("Cannot execute sort with sharded instance.");
  999. }
  1000. }
  1001. public static java.util.List sort(byte[] key,redis.clients.jedis.SortingParams sortingParameters) {
  1002. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  1003. return jedis.sort(key,sortingParameters);
  1004. }
  1005. public static java.lang.Long sort(byte[] key,byte[] dstkey) {
  1006. if (!RedisConnectionManager.isSharded()) {
  1007. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  1008. return jedis.sort(key,dstkey);
  1009. } else {
  1010. throw new JedisConnectionException("Cannot execute sort with sharded instance.");
  1011. }
  1012. }
  1013. public static java.lang.Long sort(java.lang.String key,redis.clients.jedis.SortingParams sortingParameters,java.lang.String dstkey) {
  1014. if (!RedisConnectionManager.isSharded()) {
  1015. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  1016. return jedis.sort(key,sortingParameters,dstkey);
  1017. } else {
  1018. throw new JedisConnectionException("Cannot execute sort with sharded instance.");
  1019. }
  1020. }
  1021. public static java.lang.Long sort(byte[] key,redis.clients.jedis.SortingParams sortingParameters,byte[] dstkey) {
  1022. if (!RedisConnectionManager.isSharded()) {
  1023. Jedis jedis = RedisConnectionManager.getRawConnectionInternal();
  1024. return jedis.sort(key,sortingParameters,dstkey);
  1025. } else {
  1026. throw new JedisConnectionException("Cannot execute sort with sharded instance.");
  1027. }
  1028. }
  1029. public static java.lang.String spop(java.lang.String key) {
  1030. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  1031. return jedis.spop(key);
  1032. }
  1033. public static byte[] spop(byte[] key) {
  1034. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  1035. return jedis.spop(key);
  1036. }
  1037. public static java.lang.String srandmember(java.lang.String key) {
  1038. Jedis jedis = RedisConnectionManager.getRawConnectionFromShard(key);
  1039. return jedis.sran