code: public boolean exists(String key) throws Exception {
          boolean isExist = false;
          Jedis jedis = null;
          try {
              jedis = this.jedisPool.getResource();
              isExist = jedis.exists(SafeEncoder.encode(key));
  
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              this.jedisPool.returnBrokenResource(jedis);
              throw e;
          } finally {
              if (jedis != null) {
                  this.jedisPool.returnResource(jedis);
              }
          }
          return isExist;
      }
docs: Test if the specified key exists.
  
  @param key
  
  @return
  
  @throws Exception