Class JedisPool

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class JedisPool
    extends Pool<Jedis>
    JedisPool compatibility wrapper for Valkey GLIDE client. This class provides a Jedis-like connection pool API while using Valkey GLIDE underneath. It matches the original Jedis JedisPool API for maximum compatibility.
    • Constructor Summary

      Constructors 
      Constructor Description
      JedisPool()
      Creates a JedisPool with default configuration connecting to localhost:6379.
      JedisPool​(java.lang.String url)
      WARNING: This constructor only accepts a uri string as url.
      JedisPool​(java.lang.String host, int port)
      Creates a JedisPool connecting to the specified host and port.
      JedisPool​(java.lang.String host, int port, boolean ssl)
      Creates a JedisPool connecting to the specified host and port with SSL configuration.
      JedisPool​(java.lang.String host, int port, boolean ssl, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool connecting to the specified host and port with SSL configuration and custom SSL parameters.
      JedisPool​(java.lang.String host, int port, int timeout)
      Creates a JedisPool connecting to the specified host and port with timeout configuration.
      JedisPool​(java.lang.String host, int port, int timeout, java.lang.String password)
      Creates a JedisPool connecting to the specified host and port with timeout and password authentication.
      JedisPool​(java.lang.String host, int port, java.lang.String password)
      Creates a JedisPool connecting to the specified host and port with password authentication.
      JedisPool​(java.lang.String host, int port, java.lang.String user, java.lang.String password)
      Creates a JedisPool connecting to the specified host and port with user authentication.
      JedisPool​(java.lang.String url, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      WARNING: This constructor only accepts a uri string as url.
      JedisPool​(java.net.URI uri)
      Creates a JedisPool connecting to the Redis server specified by the URI.
      JedisPool​(java.net.URI uri, int timeout)
      Creates a JedisPool connecting to the Redis server specified by the URI with timeout configuration.
      JedisPool​(java.net.URI uri, int timeout, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool connecting to the Redis server specified by the URI with timeout and SSL configuration.
      JedisPool​(java.net.URI uri, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool connecting to the Redis server specified by the URI with SSL configuration.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig)
      Creates a JedisPool with custom pool configuration connecting to localhost:6379.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String url)
      Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URL.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, boolean ssl)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with SSL.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, boolean ssl, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with SSL and custom SSL parameters.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String password, int database, java.lang.String clientName)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String password, int database, java.lang.String clientName, boolean ssl)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String password, int database, java.lang.String clientName, boolean ssl, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String user, java.lang.String password, int database, java.lang.String clientName)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String user, java.lang.String password, int database, java.lang.String clientName, boolean ssl)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with separate connection and socket timeouts, user authentication, database, client name, and SSL.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int connectionTimeout, int soTimeout, java.lang.String user, java.lang.String password, int database, java.lang.String clientName, boolean ssl, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String password)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout and password.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String password, int database)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout, password, and database.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String password, int database, java.lang.String clientName)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout, password, database, and client name.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String password, int database, java.lang.String clientName, boolean ssl)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String password, int database, java.lang.String clientName, boolean ssl, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String user, java.lang.String password, int database, java.lang.String clientName)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, int timeout, java.lang.String user, java.lang.String password, int database, java.lang.String clientName, boolean ssl)  
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, java.lang.String user, java.lang.String password)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with user authentication.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.lang.String host, int port, JedisClientConfig clientConfig)
      Creates a JedisPool with custom pool configuration connecting to the specified host and port with client configuration.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.net.URI uri)
      Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.net.URI uri, int timeout)
      Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with timeout.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.net.URI uri, int timeout, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with timeout and SSL configuration.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, java.net.URI uri, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.SSLParameters sslParameters, javax.net.ssl.HostnameVerifier hostnameVerifier)
      Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with SSL configuration.
      JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig, org.apache.commons.pool2.PooledObjectFactory<Jedis> factory)
      Creates a JedisPool with custom pool configuration and a custom pooled object factory.
      JedisPool​(org.apache.commons.pool2.PooledObjectFactory<Jedis> factory)
      Creates a JedisPool with a custom pooled object factory.
      JedisPool​(HostAndPort hostAndPort, JedisClientConfig clientConfig)
      Creates a JedisPool with the specified host and port configuration and client configuration.
    • Constructor Detail

      • JedisPool

        public JedisPool()
        Creates a JedisPool with default configuration connecting to localhost:6379.
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port)
        Creates a JedisPool connecting to the specified host and port.
        Parameters:
        host - the Redis server host
        port - the Redis server port
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         boolean ssl)
        Creates a JedisPool connecting to the specified host and port with SSL configuration.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        ssl - whether to use SSL connection
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         boolean ssl,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool connecting to the specified host and port with SSL configuration and custom SSL parameters.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        ssl - whether to use SSL connection
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         java.lang.String user,
                         java.lang.String password)
        Creates a JedisPool connecting to the specified host and port with user authentication.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        user - the username for authentication
        password - the password for authentication
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         int timeout)
        Creates a JedisPool connecting to the specified host and port with timeout configuration.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         java.lang.String password)
        Creates a JedisPool connecting to the specified host and port with password authentication.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        password - the password for authentication
      • JedisPool

        public JedisPool​(java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password)
        Creates a JedisPool connecting to the specified host and port with timeout and password authentication.
        Parameters:
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
        password - the password for authentication
      • JedisPool

        public JedisPool​(HostAndPort hostAndPort,
                         JedisClientConfig clientConfig)
        Creates a JedisPool with the specified host and port configuration and client configuration.
        Parameters:
        hostAndPort - the host and port configuration
        clientConfig - the client configuration
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.PooledObjectFactory<Jedis> factory)
        Creates a JedisPool with a custom pooled object factory.
        Parameters:
        factory - the pooled object factory for creating Jedis instances
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig)
        Creates a JedisPool with custom pool configuration connecting to localhost:6379.
        Parameters:
        poolConfig - the pool configuration
      • JedisPool

        public JedisPool​(java.net.URI uri)
        Creates a JedisPool connecting to the Redis server specified by the URI.
        Parameters:
        uri - the Redis server URI
      • JedisPool

        public JedisPool​(java.net.URI uri,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool connecting to the Redis server specified by the URI with SSL configuration.
        Parameters:
        uri - the Redis server URI
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(java.net.URI uri,
                         int timeout)
        Creates a JedisPool connecting to the Redis server specified by the URI with timeout configuration.
        Parameters:
        uri - the Redis server URI
        timeout - the connection and socket timeout in milliseconds
      • JedisPool

        public JedisPool​(java.net.URI uri,
                         int timeout,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool connecting to the Redis server specified by the URI with timeout and SSL configuration.
        Parameters:
        uri - the Redis server URI
        timeout - the connection and socket timeout in milliseconds
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         boolean ssl)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with SSL.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        ssl - whether to use SSL connection
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         boolean ssl,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with SSL and custom SSL parameters.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        ssl - whether to use SSL connection
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout and password.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
        password - the password for authentication
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password,
                         int database)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout, password, and database.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
        password - the password for authentication
        database - the database number to select
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with timeout, password, database, and client name.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        timeout - the connection and socket timeout in milliseconds
        password - the password for authentication
        database - the database number to select
        clientName - the client name to set for connections
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String user,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.String user,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String user,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String user,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with separate connection and socket timeouts, user authentication, database, client name, and SSL.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        connectionTimeout - the connection timeout in milliseconds
        soTimeout - the socket timeout in milliseconds
        user - the username for authentication
        password - the password for authentication
        database - the database number to select
        clientName - the client name to set for connections
        ssl - whether to use SSL connection
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         int connectionTimeout,
                         int soTimeout,
                         java.lang.String user,
                         java.lang.String password,
                         int database,
                         java.lang.String clientName,
                         boolean ssl,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         java.lang.String user,
                         java.lang.String password)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with user authentication.
        Parameters:
        poolConfig - the pool configuration
        host - the Redis server host
        port - the Redis server port
        user - the username for authentication
        password - the password for authentication
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.lang.String host,
                         int port,
                         JedisClientConfig clientConfig)
        Creates a JedisPool with custom pool configuration connecting to the specified host and port with client configuration. This is the main constructor that most other constructors delegate to.
        Parameters:
        poolConfig - the pool configuration for managing the connection pool
        host - the Redis server host
        port - the Redis server port
        clientConfig - the client configuration including timeouts, authentication, SSL settings, etc.
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.net.URI uri)
        Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI.
        Parameters:
        poolConfig - the pool configuration
        uri - the Redis server URI
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.net.URI uri,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with SSL configuration.
        Parameters:
        poolConfig - the pool configuration
        uri - the Redis server URI
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.net.URI uri,
                         int timeout)
        Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with timeout.
        Parameters:
        poolConfig - the pool configuration
        uri - the Redis server URI
        timeout - the connection and socket timeout in milliseconds
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         java.net.URI uri,
                         int timeout,
                         javax.net.ssl.SSLSocketFactory sslSocketFactory,
                         javax.net.ssl.SSLParameters sslParameters,
                         javax.net.ssl.HostnameVerifier hostnameVerifier)
        Creates a JedisPool with custom pool configuration connecting to the Redis server specified by the URI with timeout and SSL configuration.
        Parameters:
        poolConfig - the pool configuration
        uri - the Redis server URI
        timeout - the connection and socket timeout in milliseconds
        sslSocketFactory - SSL socket factory for creating SSL connections
        sslParameters - SSL parameters for the connection
        hostnameVerifier - hostname verifier for SSL connections
      • JedisPool

        public JedisPool​(org.apache.commons.pool2.impl.GenericObjectPoolConfig<Jedis> poolConfig,
                         org.apache.commons.pool2.PooledObjectFactory<Jedis> factory)
        Creates a JedisPool with custom pool configuration and a custom pooled object factory.
        Parameters:
        poolConfig - the pool configuration
        factory - the pooled object factory for creating Jedis instances
    • Method Detail

      • returnResourceObject

        protected void returnResourceObject​(Jedis resource)
        Description copied from class: Pool
        Return a resource to the pool.
        Overrides:
        returnResourceObject in class Pool<Jedis>
        Parameters:
        resource - the resource to return