Constructs a scredis.ClientPool instance from a config file and using the provided path.
Constructs a scredis.ClientPool instance from a config file and using the provided path.
config filename
path pointing to the scredis config object
the constructed scredis.ClientPool
The path must include to the scredis object, e.g. x.y.scredis
Constructs a scredis.ClientPool instance from a config file.
Constructs a scredis.ClientPool instance from a config file.
config filename
the constructed scredis.ClientPool
The config file must contain the scredis object at its root. This constructor is equivalent to
new ClientPool(configName, "scredis")
Constructs a scredis.ClientPool instance from a com.
Constructs a scredis.ClientPool instance from a com.typesafe.Config using the provided path.
com.typesafe.Config
path pointing to the scredis config object
the constructed scredis.ClientPool
The path must include to the scredis object, e.g. x.y.scredis
Constructs a scredis.ClientPool instance from a com.
Constructs a scredis.ClientPool instance from a com.typesafe.Config
com.typesafe.Config
the constructed scredis.ClientPool
The config must contain the scredis object at its root. This constructor is equivalent to
new ClientPool(config, "scredis")
Constructs a scredis.ClientPool instance from a scredis.RedisConfig
Constructs a scredis.ClientPool instance from a scredis.RedisConfig
the constructed scredis.ClientPool
apache pool config (org.apache.commons.pool.impl.GenericObjectPool.Config)
when true
, internal clients are validated with a PING command,
when false, only socket information are used (less reliable but more performant)
server address
server port
server password
database index to select
maximum duration for the execution of a command, can be infinite
maximum number of times the command will be executed in case recoverable errors occur such as timeouts
duration of time to sleep between subsequent tries
Authenticates/Deauthenticates all clients to/from the server.
Authenticates/Deauthenticates all clients to/from the server.
the server password, or None
if the server does not require any
1.0.0
if the password is incorrect
If the provided password is incorrect, then whatever was set as the password before remains.
Borrows a Client
from the pool
Borrows a Client
from the pool
the borrowed Client
this can throw an exception depending on how it is configured, e.g. if bounded and non-blocking
Shutdowns the pool as well as every contained Client
.
Returns a borrowed Client
to the pool
Changes the selected database on all clients.
Changes the selected database on all clients.
database index
1.0.0
if the database index is invalid
if the provided database index is invalid then previously set index remains.
Configurable pool of clients to be used in a multi-threaded environment.