Package org.jredis.ri.alphazero

Examples of org.jredis.ri.alphazero.JRedisAsyncClient


  }

  private void run() {
    int database = 11;
    ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
    JRedisFuture jredis = new JRedisAsyncClient(connSpec);
   
    byte[] key = "bench-jredis-pipeline-key".getBytes();
    int iters = 100 * 1000;
   
    try {
      cleandb(jredis);
    } catch (Throwable e) {
      e.printStackTrace();
      return;
    }
   
    for(;;){
      Future<Long> frCounter = null;
      long start = System.nanoTime();
      for(int i=0;i<iters; i++){
        frCounter = jredis.incr(key);
      }
      long queued = System.nanoTime() - start;
      try {
        long counter = frCounter.get();
        long delta_ns = System.nanoTime() - start;
View Full Code Here


  public static void usingAsyncClient () {
    ConnectionSpec spec = DefaultConnectionSpec.newSpec()
    .setCredentials("jredis".getBytes())
    .setDatabase(10);

    JRedisFuture jredis = new JRedisAsyncClient(spec);

    System.out.println ("\nusing the AsyncClient: \n\n");
    useMSet(jredis);
    useMSetNX (jredis);
   
        jredis.quit();

  }
View Full Code Here

  public static void usingAsyncClient () {
    ConnectionSpec spec = DefaultConnectionSpec.newSpec()
    .setCredentials("jredis".getBytes())
    .setDatabase(10);

    JRedisFuture jredis = new JRedisAsyncClient(spec);

    System.out.println ("\n\n** using JRedisFuture **");
    useZRangeSubset(jredis);
   
        jredis.quit();

  }
View Full Code Here

TOP

Related Classes of org.jredis.ri.alphazero.JRedisAsyncClient

Copyright © 2018 www.massapicom. 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.