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

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

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

Jedis.pexpireAt介绍

暂无

代码示例

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

@Override
 public Long execute(Jedis connection) {
  return connection.pexpireAt(key, millisecondsTimestamp);
 }
}.run(key);

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

@Override
public Long pexpireAt(byte[] key, long millisecondsTimestamp) {
 Jedis j = getShard(key);
 return j.pexpireAt(key, millisecondsTimestamp);
}

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

@Override
public Long pexpireAt(String key, long millisecondsTimestamp) {
 Jedis j = getShard(key);
 return j.pexpireAt(key, millisecondsTimestamp);
}

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

@Override
public Long pexpireAt(String key, long millisecondsTimestamp) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.pexpireAt(key, millisecondsTimestamp);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

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

/**
 * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。
 */
public Long pexpireAt(Object key, long millisecondsTimestamp) {
  Jedis jedis = getJedis();
  try {
    return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp);
  }
  finally {close(jedis);}
}

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

@Override
public Boolean pExpireAt(byte[] key, long unixTimeInMillis) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().pexpireAt(key, unixTimeInMillis),
          JedisConverters.longToBoolean()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().pexpireAt(key, unixTimeInMillis),
          JedisConverters.longToBoolean()));
      return null;
    }
    return JedisConverters.toBoolean(connection.getJedis().pexpireAt(key, unixTimeInMillis));
  } catch (Exception ex) {
    throw connection.convertJedisAccessException(ex);
  }
}

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

@Override
public Long pexpireAt(String key, long millisecondsTimestamp) {
  return jedis.pexpireAt(key, millisecondsTimestamp);
}

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

@Override
 public Long execute(Jedis connection) {
  return connection.pexpireAt(key, millisecondsTimestamp);
 }
}.run(key);

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

@Override
 public Long execute(Jedis connection) {
  return connection.pexpireAt(key, millisecondsTimestamp);
 }
}.runBinary(key);

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

/**
 * Expires a key after at a certain unix time in milliseconds.
 * <i>If the unix time is in the past the key is deleted</i>
 *
 * @param key      The key to set the expiry on
 * @param unixTime The unix time in milliseconds to expire the key at
 * @return {@code 0} if the key does not exist. <br>
 * {@code 1} if the expiry was successfully set.
 */
public static Long pExpireAt(String key, long unixTime) {
  try (Jedis jedis = jedisPool.getResource()) {
    return jedis.pexpireAt(key, unixTime);
  }
}

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

@Override
public Long pexpireAt(String key, long millisecondsTimestamp) {
 String command = "pexpireAt";
 return instrumented(command, () -> delegated.pexpireAt(key, millisecondsTimestamp));
}

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

@Override
public Long pexpireAt(final byte[] key, final long millisecondsTimestamp) {
 Jedis j = getShard(key);
 return j.pexpireAt(key, millisecondsTimestamp);
}

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

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

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

@Override
public Long pexpireAt(final String key, final long millisecondsTimestamp) {
 Jedis j = getShard(key);
 return j.pexpireAt(key, millisecondsTimestamp);
}

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

public Long pexpireAt(String key, long millisecondsTimestamp) {
  Jedis jedis = getJedis();
  try {
    return jedis.pexpireAt(key, millisecondsTimestamp);
  } finally {Streams.safeClose(jedis);}
}

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

@Override
public Long pexpireAt(String key, long millisecondsTimestamp) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.pexpireAt(key, millisecondsTimestamp);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

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

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

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

/**
 * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。
 */
public Long pexpireAt(Object key, long millisecondsTimestamp) {
  Jedis jedis = getJedis();
  try {
    return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp);
  } finally {
    returnResource(jedis);
  }
}

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

/**
 * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。
 */
public Long pexpireAt(Object key, long millisecondsTimestamp) {
  Jedis jedis = getJedis();
  try {
    return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp);
  }
  finally {close(jedis);}
}

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

/**
 * 这个命令和 EXPIREAT 命令类似,但它以毫秒为单位设置 key 的过期 unix 时间戳,而不是像 EXPIREAT 那样,以秒为单位。
 */
public Long pexpireAt(Object key, long millisecondsTimestamp) {
  Jedis jedis = getJedis();
  try {
    return jedis.pexpireAt(keyToBytes(key), millisecondsTimestamp);
  }
  finally {close(jedis);}
}

相关文章

Jedis类方法