本文整理了Java中redis.clients.jedis.Jedis.save()
方法的一些代码示例,展示了Jedis.save()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.save()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:save
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public void save() {
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().save()));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().save()));
return;
}
connection.getJedis().save();
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.save();
}
});
代码示例来源:origin: penggle/jedis-ms-sentinel
public String save() {
return master.save();
}
代码示例来源:origin: mindwind/craft-atom
private String save0(Jedis j) {
return j.save();
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public String save() {
String command = "save";
return instrumented(command, () -> delegated.save());
}
代码示例来源:origin: io.enoa/nosql-redis
default String save() {
return this.run((jedis, serializer) -> jedis.save());
}
代码示例来源:origin: GZWgssmart/Teaching
public static void main(String[] args) {
JedisPool pool = new JedisPool( "127.0.0.1", 6379);
Jedis jedis = pool.getResource();
jedis.set("c", "aaaaaa");
System.out.println(jedis.get("a"));
System.out.println(jedis.get("b"));
System.out.println(jedis.get("c"));
jedis.sadd("d", "ddd", "ddddd");
System.out.println(jedis.smembers("d"));
jedis.save();
}
}
代码示例来源:origin: hltfbk/Excitement-Open-Platform
@Override
public void close() {
jedis.save();
jedis.disconnect();
jedis = null;
this.currID = -1;
try {
BasicRedisRunner.getInstance().close(dbFile);
} catch (Exception e) {
logger.info(e.toString());
}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
/**
* Synchronously save the DB on disk.
* <p>
* Save the whole dataset on disk (this means that all the databases are saved, as well as keys
* with an EXPIRE set (the expire is preserved). The server hangs while the saving is not
* completed, no connection is served in the meanwhile. An OK code is returned when the DB was
* fully stored in disk.
* <p>
* The background variant of this command is {@link #bgsave() BGSAVE} that is able to perform the
* saving in the background while the server continues serving other clients.
* <p>
*
* @return Status code reply
*/
public String save() {
Jedis jedis = getJedis();
try {
return jedis.save();
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public void save() {
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().save()));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().save()));
return;
}
connection.getJedis().save();
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void save() {
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().save()));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().save()));
return;
}
connection.getJedis().save();
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!