public final class DefaultConnectionSpec extends ConnectionSpec.RefImpl
ConnectionSpec for details of these properties and flags.
The default Connection.Modality for the Connection is Connection.Modality.Synchronous.
This ConnectionSpec is configured to prefer bandwidth and relatively large (48K)
buffers (which is probably less than your OS's default buffer sizes anyway, but you never know).
Connection Retry limit is DefaultConnectionSpec#DEFAULT_RECONNECT_CNT.
Connection is spec'd for Keep Alive.
Socket timeout is DEFAULT_READ_TIMEOUT_MSEC
No codecs and/or compression classes are defined.
ConnectionSpec.RefImpl| Constructor and Description |
|---|
DefaultConnectionSpec()
Instantiates a default connection spec for the given host and port.
|
DefaultConnectionSpec(InetAddress address,
int port)
Deprecated.
|
DefaultConnectionSpec(InetAddress address,
int port,
int database,
byte[] credentials)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static ConnectionSpec |
newSpec() |
static ConnectionSpec |
newSpec(InetAddress address,
int port,
int database,
byte[] credentials)
Returns an instance of the
ConnectionSpec used by this Connection
as default spec, for the provided params. |
static ConnectionSpec |
newSpec(String host,
int port,
int database,
byte[] credentials)
Returns an instance of the
ConnectionSpec used by this Connection
as default spec, for the provided params. |
getAddress, getConnectionFlag, getConnectionProperty, getCredentials, getDatabase, getHeartbeat, getMaxConnectWait, getModality, getPort, getReconnectCnt, getSocketFlag, getSocketProperty, setAddress, setConnectionFlag, setConnectionProperty, setCredentials, setCredentials, setDatabase, setHeartbeat, setMaxConnectWait, setModality, setPort, setReconnectCnt, setSocketFlag, setSocketPropertypublic DefaultConnectionSpec()
throws ClientRuntimeException
address - port - ClientRuntimeException - for invalid port, or null address values@Deprecated public DefaultConnectionSpec(InetAddress address, int port) throws ClientRuntimeException
address - port - ClientRuntimeException - for invalid port, or null address values@Deprecated public DefaultConnectionSpec(InetAddress address, int port, int database, byte[] credentials) throws ClientRuntimeException
address - port - database - credentials - ClientRuntimeException - for invalid port, or null address valuespublic static final ConnectionSpec newSpec() throws ClientRuntimeException
ClientRuntimeExceptionpublic static final ConnectionSpec newSpec(String host, int port, int database, byte[] credentials) throws ClientRuntimeException
ConnectionSpec used by this Connection
as default spec, for the provided params.host - port - database - credentials - redisversion - ClientRuntimeExceptionpublic static final ConnectionSpec newSpec(InetAddress address, int port, int database, byte[] credentials) throws ClientRuntimeException
ConnectionSpec used by this Connection
as default spec, for the provided params.address - port - database - credentials - redisversion - ClientRuntimeExceptionCopyright © 2009–2021. All rights reserved.