Examples of dbSize()


Examples of org.idevlab.rjc.Session.dbSize()

  @Test
  public void testRaw() throws Exception {
    Session jr = (Session) factory.getConnection().getNativeConnection();

    System.out.println(jr.dbSize());
    System.out.println(jr.exists("foobar"));
    jr.set("foobar", "barfoo");
    System.out.println(jr.get("foobar"));
  }
}
View Full Code Here

Examples of org.jredis.JRedis.dbsize()

  @Test
  public void testRaw() throws Exception {
    JRedis jr = (JRedis) factory.getConnection().getNativeConnection();

    System.out.println(jr.dbsize());
    System.out.println(jr.exists("foobar"));
    jr.set("foobar", "barfoo");
    System.out.println(jr.get("foobar"));
  }
View Full Code Here

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

    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());
    } finally {
      connection2.close();
      factory2.destroy();
    }
  }
View Full Code Here

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

    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());
    } finally {
      connection2.close();
      factory2.destroy();
    }
  }
View Full Code Here

Examples of redis.clients.jedis.Jedis.dbSize()

  }
  pool.returnResource(jedis);
  // check quantity for each shard
  Jedis j = new Jedis(shards.get(0));
  j.connect();
  Long c1 = j.dbSize();
  j.disconnect();
  j = new Jedis(shards.get(1));
  j.connect();
  Long c2 = j.dbSize();
  j.disconnect();
View Full Code Here

Examples of redis.clients.jedis.Jedis.dbSize()

  j.connect();
  Long c1 = j.dbSize();
  j.disconnect();
  j = new Jedis(shards.get(1));
  j.connect();
  Long c2 = j.dbSize();
  j.disconnect();
  // shutdown shard 2 and check thay the pool returns an instance with c1
  // items on one shard
  // alter shard 1 and recreate pool
  pool.destroy();
View Full Code Here

Examples of redis.clients.jedis.Jedis.dbSize()

public class JedisTest extends JedisCommandTestBase {
    @Test
    public void useWithoutConnecting() {
  Jedis jedis = new Jedis("localhost");
  jedis.auth("foobared");
  jedis.dbSize();
    }

    @Test
    public void checkBinaryData() {
  byte[] bigdata = new byte[1777];
View Full Code Here

Examples of redis.clients.jedis.Jedis.dbSize()

  public int getSize() throws IOException {
    Jedis jedis = null;
    Boolean error = true;
    try {
      jedis = acquireConnection();
      int size = jedis.dbSize().intValue();
      error = false;
      return size;
    } finally {
      if (jedis != null) {
        returnConnection(jedis, error);
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.