redis.clients.jedis.Jedis.hexists()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(247)

本文整理了Java中redis.clients.jedis.Jedis.hexists()方法的一些代码示例,展示了Jedis.hexists()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.hexists()方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:hexists

Jedis.hexists介绍

[英]Test for existence of a specified field in a hash. Time complexity: O(1)
[中]测试哈希中是否存在指定字段。时间复杂度:O(1)

代码示例

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.hexists(key, field);
 }
}.run(key);

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.hexists(key, field);
 }
}.runBinary(key);

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean hexists(byte[] key, byte[] field) {
 Jedis j = getShard(key);
 return j.hexists(key, field);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean hexists(String key, String field) {
 Jedis j = getShard(key);
 return j.hexists(key, field);
}

代码示例来源:origin: Netflix/conductor

@Override
public Boolean hexists(String key, String field) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hexists(key, field);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: jfinal/jfinal

/**
 * 查看哈希表 key 中,给定域 field 是否存在。
 */
public boolean hexists(Object key, Object field) {
  Jedis jedis = getJedis();
  try {
    return jedis.hexists(keyToBytes(key), fieldToBytes(field));
  }
  finally {close(jedis);}
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Boolean hExists(byte[] key, byte[] field) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(field, "Fields must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().hexists(key, field)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().hexists(key, field)));
      return null;
    }
    return connection.getJedis().hexists(key, field);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: jwpttcg66/NettyGameServer

public boolean hexists(String key , String field){
  Jedis jedis = null;
  boolean sucess = true;
  try {
    jedis = jedisPool.getResource();
    return jedis.hexists(key, field);
  } catch (Exception e) {
    sucess = false;
    returnBrokenResource(jedis, "hexists", e);
  } finally {
    if (sucess && jedis != null) {
      returnResource(jedis);
    }
  }
  return false;
}

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.hexists(key, field);
  }
});

代码示例来源:origin: tangyanbo/springmore

@Override
  public Boolean action(Jedis jedis) {
    return jedis.hexists(key, fieldName);
  }
});

代码示例来源:origin: yrain/smart-cache

@Override
  Boolean doInJedis(Jedis jedis) {
    return jedis.hexists(key, field);
  }
});

代码示例来源:origin: apache/servicemix-bundles

@Override
 public Boolean execute(Jedis connection) {
  return connection.hexists(key, field);
 }
}.runBinary(key);

代码示例来源:origin: apache/servicemix-bundles

@Override
 public Boolean execute(Jedis connection) {
  return connection.hexists(key, field);
 }
}.run(key);

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Boolean hexists(byte[] key, byte[] field) {
 String command = "hexists";
 return instrumented(command, () -> delegated.hexists(key, field));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Boolean hexists(String key, String field) {
 String command = "hexists";
 return instrumented(command, () -> delegated.hexists(key, field));
}

代码示例来源:origin: org.leapframework/jmms-modules-redis

/**
 * Determine if a hash field exists.
 */
public Result<Boolean> hexists(String key, String field) {
  return exec(redis -> redis.hexists(key, field));
}

代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence

@Override
public Boolean hexists(String key, String field) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hexists(key, field);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: yangfuhai/jboot

/**
 * 查看哈希表 key 中,给定域 field 是否存在。
 */
public boolean hexists(Object key, Object field) {
  Jedis jedis = getJedis();
  try {
    return jedis.hexists(keyToBytes(key), valueToBytes(field));
  } finally {
    returnResource(jedis);
  }
}

代码示例来源:origin: com.jfinal/jfinal

/**
 * 查看哈希表 key 中,给定域 field 是否存在。
 */
public boolean hexists(Object key, Object field) {
  Jedis jedis = getJedis();
  try {
    return jedis.hexists(keyToBytes(key), fieldToBytes(field));
  }
  finally {close(jedis);}
}

代码示例来源:origin: com.github.sogyf/goja-jfinal

/**
 * 查看哈希表 key 中,给定域 field 是否存在。
 */
public boolean hexists(Object key, Object field) {
  Jedis jedis = getJedis();
  try {
    return jedis.hexists(keyToBytes(key), keyToBytes(field));
  }
  finally {close(jedis);}
}

相关文章

Jedis类方法