本文整理了Java中redis.clients.jedis.Jedis.resetState()
方法的一些代码示例,展示了Jedis.resetState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.resetState()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:resetState
暂无
代码示例来源:origin: sohutv/cachecloud
public void resetState() {
for (Jedis jedis : getAllShards()) {
jedis.resetState();
}
}
代码示例来源:origin: sohutv/cachecloud
protected void returnResource(final Jedis resource) {
if (resource != null) {
resource.resetState();
returnResourceObject(resource);
}
}
代码示例来源:origin: sohutv/cachecloud
@Override
protected void returnResource(final Jedis resource) {
if (resource != null) {
try {
resource.resetState();
returnResourceObject(resource);
} catch (Exception e) {
returnBrokenResource(resource);
throw new JedisException("Could not return the resource to the pool", e);
}
}
}
private final String host;
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public void resetState() {
delegated.resetState();
}
代码示例来源:origin: penggle/jedis-ms-sentinel
public void resetState() {
master.resetState();
for (Jedis jedis : getAllShards()) {
jedis.resetState();
}
}
代码示例来源:origin: com.baidu/bdrp-client
/**
* 将正常的资源放回连接池
*
* @param resource Jedis资源
*/
public void returnResource(final Jedis resource) {
resource.resetState();
returnResourceObject(resource);
}
}
代码示例来源:origin: apache/servicemix-bundles
public void resetState() {
for (Jedis jedis : getAllShards()) {
jedis.resetState();
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
protected void returnResource(final Jedis resource) {
if (resource != null) {
resource.resetState();
returnResourceObject(resource);
}
}
代码示例来源:origin: tangyanbo/springmore
/**
* Return a available jedis connection back to pool.
*/
@Override
public void returnResource(final Jedis resource) {
if (resource != null) {
resource.resetState();
returnResourceObject(resource);
}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public void resetState() {
jedis().resetState();
}
代码示例来源:origin: intsmaze/intsmaze
/**
* @deprecated starting from Jedis 3.0 this method won't exist. Resouce
* cleanup should be done using @see
* {@link redis.clients.jedis.Jedis#close()}
*/
@Override
@Deprecated
public void returnResource(final Jedis resource) {
if (resource != null) {
try {
resource.resetState();
returnResourceObject(resource);
} catch (Exception e) {
returnBrokenResource(resource);
throw new JedisException("Could not return the resource to the pool", e);
}
}
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
protected void returnResource(final Jedis resource) {
if (resource != null) {
try {
resource.resetState();
returnResourceObject(resource);
} catch (Exception e) {
returnBrokenResource(resource);
throw new JedisException("Resource is returned to the pool as broken", e);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!