Package org.jredis.ri.alphazero

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


          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<100000; i++){
            rand.nextBytes(data);
            pipeline.lpush("my-list", data);
          }
          /* sync call */
          long llen = pipeline.sync().llen("my-list");
         
          String cntrKey = "my-cntr";
View Full Code Here


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

          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<1000000; i++){
            rand.nextBytes(data);
            pipeline.lpush("my-list", data);
          }
          /*
           * switch to synchronous semantics
           * the following call will block until
           * all the responses for above + the llen()
View Full Code Here

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