本文整理了Java中redis.clients.jedis.Jedis.persist()
方法的一些代码示例,展示了Jedis.persist()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.persist()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:persist
[英]Undo a #expire(String,int) at turning the expire key into a normal key.
Time complexity: O(1)
[中]
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.persist(key);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.persist(key);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long persist(final byte[] key) {
Jedis j = getShard(key);
return j.persist(key);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Long persist(final String key) {
Jedis j = getShard(key);
return j.persist(key);
}
代码示例来源:origin: Netflix/conductor
@Override
public Long persist(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.persist(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: caoxinyu/RedisClient
@Override
protected void command() {
jedis.select(db);
if(second != -1)
jedis.expire(key, second);
else
jedis.persist(key);
}
代码示例来源:origin: jfinal/jfinal
/**
* 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。
*/
public Long persist(Object key) {
Jedis jedis = getJedis();
try {
return jedis.persist(keyToBytes(key));
}
finally {close(jedis);}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Boolean persist(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(
connection.newJedisResult(connection.getRequiredPipeline().persist(key), JedisConverters.longToBoolean()));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().persist(key),
JedisConverters.longToBoolean()));
return null;
}
return JedisConverters.toBoolean(connection.getJedis().persist(key));
} catch (Exception ex) {
throw connection.convertJedisAccessException(ex);
}
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Long persist(String key) {
return jedis.persist(key);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long execute(Jedis connection) {
return connection.persist(key);
}
}.runBinary(key);
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.persist(key);
}
});
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long execute(Jedis connection) {
return connection.persist(key);
}
}.run(key);
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long persist(byte[] key) {
String command = "persist";
return instrumented(command, () -> delegated.persist(key));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long persist(String key) {
String command = "persist";
return instrumented(command, () -> delegated.persist(key));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long persist(final byte[] key) {
Jedis j = getShard(key);
return j.persist(key);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long persist(final String key) {
Jedis j = getShard(key);
return j.persist(key);
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Long persist(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.persist(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: com.jfinal/jfinal
/**
* 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。
*/
public Long persist(Object key) {
Jedis jedis = getJedis();
try {
return jedis.persist(keyToBytes(key));
}
finally {close(jedis);}
}
代码示例来源:origin: yangfuhai/jboot
/**
* 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。
*/
public Long persist(Object key) {
Jedis jedis = getJedis();
try {
return jedis.persist(keyToBytes(key));
} finally {
returnResource(jedis);
}
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
/**
* 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。
*/
public Long persist(Object key) {
Jedis jedis = getJedis();
try {
return jedis.persist(keyToBytes(key));
}
finally {close(jedis);}
}
内容来源于网络,如有侵权,请联系作者删除!