Package redis.clients.jedis

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


    @Before
    public void setUp() throws Exception {
  Jedis jedis = new Jedis(redis1.getHost(), redis1.getPort());
  jedis.auth("foobared");
  jedis.flushAll();
  jedis.disconnect();
  jedis = new Jedis(redis2.getHost(), redis2.getPort());
  jedis.auth("foobared");
  jedis.flushAll();
  jedis.disconnect();
View Full Code Here


  jedis.flushAll();
  jedis.disconnect();
  jedis = new Jedis(redis2.getHost(), redis2.getPort());
  jedis.auth("foobared");
  jedis.flushAll();
  jedis.disconnect();

  JedisShardInfo shardInfo1 = new JedisShardInfo(redis1.getHost(),
    redis1.getPort());
  JedisShardInfo shardInfo2 = new JedisShardInfo(redis2.getHost(),
    redis2.getPort());
View Full Code Here

  shards.get(0).setPassword("foobared");
  shards.get(1).setPassword("foobared");
  Jedis j = new Jedis(shards.get(0));
  j.connect();
  j.flushAll();
  j.disconnect();
  j = new Jedis(shards.get(1));
  j.connect();
  j.flushAll();
  j.disconnect();
View Full Code Here

  j.flushAll();
  j.disconnect();
  j = new Jedis(shards.get(1));
  j.connect();
  j.flushAll();
  j.disconnect();

    }

    @Test
    public void checkConnections() {
View Full Code Here

  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();
  // shutdown shard 2 and check thay the pool returns an instance with c1
View Full Code Here

  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();
  shards.set(1, new JedisShardInfo("localhost", 1234));
View Full Code Here

  jedis.disconnect();

  Jedis j = new Jedis(s1.getHost(), s1.getPort());
  j.auth("foobared");
  assertEquals("bar", j.get("a"));
  j.disconnect();

  j = new Jedis(s2.getHost(), s2.getPort());
  j.auth("foobared");
  assertEquals("bar1", j.get("b"));
  j.disconnect();
View Full Code Here

  j.disconnect();

  j = new Jedis(s2.getHost(), s2.getPort());
  j.auth("foobared");
  assertEquals("bar1", j.get("b"));
  j.disconnect();
    }

    @Test
    public void tryShardingWithMurmure() {
  List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
View Full Code Here

  jedis.disconnect();

  Jedis j = new Jedis(s1.getHost(), s1.getPort());
  j.auth("foobared");
  assertEquals("bar", j.get("a"));
  j.disconnect();

  j = new Jedis(s2.getHost(), s2.getPort());
  j.auth("foobared");
  assertEquals("bar1", j.get("b"));
  j.disconnect();
View Full Code Here

  j.disconnect();

  j = new Jedis(s2.getHost(), s2.getPort());
  j.auth("foobared");
  assertEquals("bar1", j.get("b"));
  j.disconnect();
    }

    @Test
    public void checkKeyTags() {
  List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
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.