Examples of flushDB()


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

       */
      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++){
            rand.nextBytes(data);
View Full Code Here

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

            pipeline.set("random:"+i, "value:" + rand.nextInt());
          }
          /* sync call */
          String randomVal = toStr (pipeline.sync().get("random:"+999));
         
          pipeline.flushdb();
        System.out.format ("end using sync() = %d msec\n", System.currentTimeMillis() - start);
         
          System.out.format("%s => %d\n", cntrKey, cntr);
          System.out.format("%s => %s\n", "random:"+999, randomVal);
          System.out.format("%s has %s items\n", "my-list", llen);
View Full Code Here

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

        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++){
            rand.nextBytes(data);
View Full Code Here

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

            pipeline.set("random:"+i, "value:" + rand.nextInt());
          }
          /* sync call */
          String randomVal = toStr (pipeline.sync().get("random:"+999));
         
          pipeline.flushdb();
        System.out.format ("end using sync() = %d msec\n", System.currentTimeMillis() - start);
         
          System.out.format("%s => %d\n", cntrKey, cntr);
          System.out.format("%s => %s\n", "random:"+999, randomVal);
          System.out.format("%s has %s items\n", "my-list", llen);
View Full Code Here

Examples of org.springframework.data.keyvalue.redis.connection.RedisConnection.flushDb()

  }

  @After
  public void stop() {
    RedisConnection connection = factory.getConnection();
    connection.flushDb();
    connection.close();
  }

  @AfterClass
  public static void cleanUp() {
View Full Code Here

Examples of org.springframework.data.redis.connection.DefaultStringRedisConnection.flushDb()

  public void testSelectDb() {
    LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(), SettingsUtils.getPort());
    factory2.setDatabase(1);
    factory2.afterPropertiesSet();
    StringRedisConnection connection2 = new DefaultStringRedisConnection(factory2.getConnection());
    connection2.flushDb();
    // put an item in database 0
    connection.set("sometestkey", "sometestvalue");
    try {
      // there should still be nothing in database 1
      assertEquals(Long.valueOf(0), connection2.dbSize());
View Full Code Here

Examples of org.springframework.data.redis.connection.RedisConnection.flushDb()

  }

  @After
  public void stop() {
    RedisConnection connection = factory.getConnection();
    connection.flushDb();
    connection.close();
  }

  @AfterClass
  public static void cleanUp() {
View Full Code Here

Examples of org.springframework.data.redis.connection.RedisConnection.flushDb()

  }

  @After
  public void stop() {
    RedisConnection connection = factory.getConnection();
    connection.flushDb();
    connection.close();
  }

  @AfterClass
  public static void cleanUp() {
View Full Code Here

Examples of org.springframework.data.redis.connection.RedisConnection.flushDb()

  }

  @After
  public void stop() {
    RedisConnection connection = factory.getConnection();
    connection.flushDb();
    connection.close();
  }

  @AfterClass
  public static void cleanUp() {
View Full Code Here

Examples of org.springframework.data.redis.connection.StringRedisConnection.flushDb()

  public void testSelectDb() {
    LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(), SettingsUtils.getPort());
    factory2.setDatabase(1);
    factory2.afterPropertiesSet();
    StringRedisConnection connection2 = new DefaultStringRedisConnection(factory2.getConnection());
    connection2.flushDb();
    // put an item in database 0
    connection.set("sometestkey", "sometestvalue");
    try {
      // there should still be nothing in database 1
      assertEquals(Long.valueOf(0), connection2.dbSize());
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.