Package org.jredis.ri.alphazero

Examples of org.jredis.ri.alphazero.JRedisPipeline.ping()


       * ExecutionException handling code so its a bit prettier.
       */
      try {
        long start = System.currentTimeMillis();
       
          pipeline.ping();
          pipeline.flushdb();

          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<100000; i++){
View Full Code Here


     */
    private static void usingSynchSemantics (ConnectionSpec spec) {
      JRedisPipeline pipeline = new JRedisPipeline(spec);
      try {
        long start = System.currentTimeMillis();
          pipeline.ping();
          pipeline.flushall();
          String cntrKey = "my-cntr";
         
          Random rand = new Random();
          byte[] data = new byte[8];
View Full Code Here

        do {
          int cnt = 0;
          Util.Timer timer = Timer.startNewTimer();
          Future<ResponseStatus> futureStat = null;
          while(cnt < reqCnt){
            futureStat = pipeline.ping();
            cnt++;
          }
          long reqDoneTime = timer.mark();
        futureStat.get();
          long respDoneTime = timer.mark();
View Full Code Here

      try {
        long start = System.currentTimeMillis();
       
        /* a sequence of asynchronous calls */
       
          pipeline.ping();
          pipeline.flushdb();

          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<1000000; i++){
View Full Code Here

    @SuppressWarnings("boxing")
  private static void usingSynchSemantics (ConnectionSpec spec) {
      JRedisPipeline pipeline = new JRedisPipeline(spec);
      try {
        long start = System.currentTimeMillis();
          pipeline.ping();
          pipeline.flushall();
          String cntrKey = "my-cntr";
         
          Random rand = new Random();
          byte[] data = new byte[8];
View Full Code Here

        do {
          int cnt = 0;
          Util.Timer timer = Timer.startNewTimer();
          Future<ResponseStatus> futureStat = null;
          while(cnt < reqCnt){
            futureStat = pipeline.ping();
            cnt++;
          }
          long reqDoneTime = timer.mark();
          assert futureStat != null;
        @SuppressWarnings("null")
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.