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

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

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

Jedis.objectIdletime介绍

暂无

代码示例

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

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

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

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

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

/**
 * 对象没有被访问的空闲时间
 */
public Long objectIdletime(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectIdletime(keyToBytes(key));
  }
  finally {close(jedis);}
}

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

@Nullable
@Override
public Duration idletime(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectIdletime(key),
          connection.clusterGetNodeForKey(key))
      .mapValue(Converters::secondsToDuration);
}

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

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

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

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

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

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

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

private Long objectidletime0(Jedis j, String key) {
  return j.objectIdletime(key);
}

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

public Long objectIdletime(String string) {
  return master.objectIdletime(string);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

@Nullable
@Override
public Duration idletime(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectIdletime(key),
          connection.clusterGetNodeForKey(key))
      .mapValue(Converters::secondsToDuration);
}

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

@Nullable
@Override
public Duration idletime(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode((JedisClusterCommandCallback<Long>) client -> client.objectIdletime(key),
          connection.clusterGetNodeForKey(key))
      .mapValue(Converters::secondsToDuration);
}

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

/**
 * 对象没有被访问的空闲时间
 */
public Long objectIdletime(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectIdletime(keyToBytes(key));
  } finally {
    returnResource(jedis);
  }
}

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

/**
 * 对象没有被访问的空闲时间
 */
public Long objectIdletime(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectIdletime(keyToBytes(key));
  }
  finally {close(jedis);}
}

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

/**
 * 对象没有被访问的空闲时间
 */
public Long objectIdletime(Object key) {
  Jedis jedis = getJedis();
  try {
    return jedis.objectIdletime(keyToBytes(key));
  }
  finally {close(jedis);}
}

相关文章

微信公众号

最新文章

更多

Jedis类方法