Package net.rubyeye.xmemcached

Examples of net.rubyeye.xmemcached.MemcachedClient.shutdown()


      e.printStackTrace();
    } catch (InterruptedException e) {
      // ignore
    }
    try {
      memcachedClient.shutdown();
    } catch (Exception e) {
      System.err.println("Shutdown MemcachedClient fail");
      e.printStackTrace();
    }
  }
View Full Code Here


          .println("Useage:java MemcachedStateListenerExample [servers]");
      System.exit(1);
    }
    MemcachedClient memcachedClient = getMemcachedClient(args[0]);
    try {
      memcachedClient.shutdown();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    cdl.await();
    System.out.println("test cas,timed:"
        + (System.currentTimeMillis() - start));
    // print result,must equals to NUM
    System.out.println("result=" + mc.get("a"));
    mc.shutdown();
  }
}
View Full Code Here

      e.printStackTrace();
    } catch (InterruptedException e) {
      // ignore
    }
    try {
      memcachedClient.shutdown();
    } catch (Exception e) {
      System.err.println("Shutdown MemcachedClient fail");
      e.printStackTrace();
    }
  }
View Full Code Here

    barrier.await();

    long secs = watch.getDurationInMillis() / 1000;
    int total = 4 * repeat * threads;
    long tps = total / secs;
    client.shutdown();
    System.out.println("duration:" + secs + " seconds,tps:" + tps
        + " op/seconds,total:" + total + " ops");

  }
}
View Full Code Here

      e.printStackTrace();
    } catch (InterruptedException e) {
      // ignore
    }
    try {
      memcachedClient.shutdown();
    } catch (Exception e) {
      System.err.println("Shutdown MemcachedClient fail");
      e.printStackTrace();
    }
  }
View Full Code Here

      for (int j = 0; j < BYTES.length; j++) {
        int repeats = getReapts(i);
        test(memcachedClient, BYTES[j], THREADS[i], repeats, true);
      }
    }
    memcachedClient.shutdown();

  }

  private static void warmUp(MemcachedClient memcachedClient)
      throws Exception {
View Full Code Here

                    }
                }
                public void destroy() {
                    super.destroy();
                    try {
                        memcachedClient.shutdown();
                    } catch (Throwable e) {
                        logger.warn(e.getMessage(), e);
                    }
                }
            };
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.