Package redis.clients.jedis

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


  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

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

  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.