All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.providers.ConnectionProvider Maven / Gradle / Ivy

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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy