
apoc.redis.RedisConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apoc-extended Show documentation
Show all versions of apoc-extended Show documentation
Extended package for Neo4j Procedures
package apoc.redis;
import io.lettuce.core.ClientOptions;
import io.lettuce.core.RedisClient;
abstract class RedisConnection implements IRedisConnection {
protected final RedisClient client;
protected final RedisConfig conf;
public RedisConnection(String uri, RedisConfig config) {
this.conf = config;
this.client = RedisClient.create(uri);
this.client.setDefaultTimeout(conf.getTimeout());
this.client.setOptions(ClientOptions.builder()
.scriptCharset(conf.getScriptCharset())
.autoReconnect(conf.isAutoReconnect())
.build());
}
@Override
public void close() {
this.client.shutdown();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy