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

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

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

Jedis.objectRefcount介绍

暂无

代码示例

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

public Long objectRefcount(byte[] key) {
 Jedis j = getShard(key);
 return j.objectRefcount(key);
}

代码示例来源:origin: caoxinyu/RedisClient

@Override
protected void command() {
  jedis.select(db);
  count = jedis.objectRefcount(key);
}

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

/**
 * 对象被引用的数量
 */
public Long objectRefcount(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(keyToBytes(key));
  }
  finally {close(jedis);}
}

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

@Nullable
@Override
public Long refcount(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectRefcount(key),
          connection.clusterGetNodeForKey(key))
      .getValue();
}

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

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

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

@Override
public Long objectRefcount(String string) {
  return jedis.objectRefcount(string);
}

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

@Override
public Long objectRefcount(String string) {
  return jedis.objectRefcount(string);
}

代码示例来源:origin: mindwind/craft-atom

private Long objectrefcount0(Jedis j, String key) {
  return j.objectRefcount(key);
}

代码示例来源:origin: penggle/jedis-ms-sentinel

public Long objectRefcount(byte[] key) {
  return master.objectRefcount(key);
}

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

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

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

@Override
public Long objectRefcount(String string) {
 String command = "objectRefcount";
 return instrumented(command, () -> delegated.objectRefcount(string));
}

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

public Long objectRefcount(final byte[] key) {
 Jedis j = getShard(key);
 return j.objectRefcount(key);
}

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

default Long objectrefcount(String string) {
 return this.run((jedis, serializer) -> jedis.objectRefcount(string));
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Long objectRefcount(byte[] key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(key);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Long objectRefcount(String string) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(string);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Nullable
@Override
public Long refcount(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectRefcount(key),
          connection.clusterGetNodeForKey(key))
      .getValue();
}

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

@Nullable
@Override
public Long refcount(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectRefcount(key),
          connection.clusterGetNodeForKey(key))
      .getValue();
}

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

/**
 * 对象被引用的数量
 */
public Long objectRefcount(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(keyToBytes(key));
  } finally {
    returnResource(jedis);
  }
}

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

/**
 * 对象被引用的数量
 */
public Long objectRefcount(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(keyToBytes(key));
  }
  finally {close(jedis);}
}

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

/**
 * 对象被引用的数量
 */
public Long objectRefcount(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectRefcount(keyToBytes(key));
  }
  finally {close(jedis);}
}

相关文章

Jedis类方法