Package redis.clients.jedis

Examples of redis.clients.jedis.JedisSentinelPool.returnBrokenResource()


      assertTrue(jedis == jedis2);
      assertEquals("jedis", jedis2.get("hello"));
  } catch (JedisConnectionException e) {
      if (jedis2 != null) {
    pool.returnBrokenResource(jedis2);
    jedis2 = null;
      }
  } finally {
      if (jedis2 != null)
    pool.returnResource(jedis2);
View Full Code Here


  config.setBlockWhenExhausted(false);
  JedisSentinelPool pool = new JedisSentinelPool(MASTER_NAME, sentinels,
    config, 1000, "foobared", 2);

  Jedis nullJedis = null;
  pool.returnBrokenResource(nullJedis);
  pool.destroy();
    }

    private void forceFailover(JedisSentinelPool pool)
      throws InterruptedException {
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.