/** this is not supposed to get called unless you actually run redis on port 9999 :P */
 public void run() {
   final byte[] key = "foo".getBytes();
   for (; ; ) {
     try {
       @SuppressWarnings("unused")
       Future<Long> fcntr = jredis.incr(key);
     } catch (Throwable t) {
       t.printStackTrace();
     }
   }
 }
Beispiel #2
0
  /** this is not supposed to get called unless you actually run redis on port 9999 :P */
  public void run() {
    try {
      Map<String, String> infomap = jredis.info().get();
      for (String k : infomap.keySet()) {
        System.out.format("%s => %s\n", k, infomap.get(k));
      }

      System.out.format("\n\n### InfoMap needs to be updated to include ###\n");
      for (String k : infomap.keySet()) {
        try {
          RedisInfo.valueOf(k);
        } catch (IllegalArgumentException e) {
          System.out.format("%s,\n", k);
        }
      }
      System.out.format("### END ###\n");

    } catch (Throwable t) {
      t.printStackTrace();
    } finally {
      jredis.quit();
    }
  }