redis.clients.jedis.providers.ConnectionProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.providers;
import java.util.Collections;
import java.util.Map;
import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.Connection;
public interface ConnectionProvider extends AutoCloseable {
Connection getConnection();
Connection getConnection(CommandArguments args);
default Map, ?> getConnectionMap() {
final Connection c = getConnection();
return Collections.singletonMap(c.toString(), c);
}
}