Beispiel #1
0
  public List<String> blpop(int timeout, String... keys) {
    checkIsInMulti();
    List<String> args = new ArrayList<String>();
    for (String arg : keys) {
      args.add(arg);
    }
    args.add(String.valueOf(timeout));

    client.blpop(args.toArray(new String[args.size()]));
    client.setTimeoutInfinite();
    List<String> multiBulkReply = client.getMultiBulkReply();
    client.rollbackTimeout();
    return multiBulkReply;
  }
Beispiel #2
0
 public void psubscribe(JedisPubSub jedisPubSub, String... patterns) {
   client.setTimeoutInfinite();
   jedisPubSub.proceedWithPatterns(client, patterns);
   client.rollbackTimeout();
 }
Beispiel #3
0
 public void subscribe(JedisPubSub jedisPubSub, String... channels) {
   client.setTimeoutInfinite();
   jedisPubSub.proceed(client, channels);
   client.rollbackTimeout();
 }