Package redis.clients.jedis

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


    }

    Jedis temp = null;
    try {
      temp = getJedis(node);
      temp.connect();
      return temp.ping().equalsIgnoreCase("pong");
    } catch (Exception e) {
      return false;
    } finally {
      if (temp != null) {
View Full Code Here


      if (usePool && pool != null) {
        return pool.getResource();
      }
      Jedis jedis = new Jedis(getShardInfo());
      // force initialization (see Jedis issue #82)
      jedis.connect();
      return jedis;
    } catch (Exception ex) {
      throw new RedisConnectionFailureException("Cannot get Jedis connection", ex);
    }
  }
View Full Code Here

            final Jedis jedis;
            jedis = new JedisValid(host, port, timeout);
            if (password != null) {
              jedis.getClient().setPassword(password);
            }
            jedis.connect();
            return jedis;
        }

        public void destroyObject(final Object obj) throws Exception {
            if (obj instanceof JedisValid) {
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.