case class ConnectionConfig(initCommands: RedisBatch[Any] = RedisBatch.unit, actorName: commons.OptArg[String] = OptArg.Empty, localAddress: commons.OptArg[InetSocketAddress] = OptArg.Empty, socketOptions: List[SocketOption] = Nil, connectTimeout: commons.OptArg[FiniteDuration] = OptArg.Empty, maxWriteSizeHint: commons.OptArg[Int] = 50000, reconnectionStrategy: RetryStrategy = ..., debugListener: DebugListener = DevNullListener) extends Product with Serializable
Configuration options for a single Redis connection.
initCommands
usage example:
implicit val actorSystem = ActorSystem() import RedisApi.Batches.StringTyped._ val nodeClient = new RedisNodeClient( config = NodeConfig( poolSize = 8, connectionConfigs = connectionId => ConnectionConfig( initCommands = auth("mypassword") *> clientSetname(s"conn_$$connectionId") *> select(1) ) ) )
- initCommands
commands always sent upon establishing a Redis connection (and every time it's reconnected). The most common reason to configure
initCommands
is to specify authentication password used by every connection (AUTH
command), but it's also useful for commands likeCLIENT SETNAME
,SELECT
, etc. Note that these are all commands that can't be executed directly by RedisNodeClient or RedisClusterClient.- actorName
name of the actor representing the connection
- localAddress
local bind address for the connection
- socketOptions
socket options for the connection
- connectTimeout
timeout for establishing connection
- maxWriteSizeHint
hint for maximum number of bytes sent in a single network write message (the actual number of bytes sent may be slightly larger)
- reconnectionStrategy
a RetryStrategy used to determine what delay should be used when reconnecting a failed connection. NOTE:
reconnectionStrategy
is ignored byRedisConnectionClient
- debugListener
listener for traffic going through this connection. Only for debugging and testing purposes
- Alphabetic
- By Inheritance
- ConnectionConfig
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ConnectionConfig(initCommands: RedisBatch[Any] = RedisBatch.unit, actorName: commons.OptArg[String] = OptArg.Empty, localAddress: commons.OptArg[InetSocketAddress] = OptArg.Empty, socketOptions: List[SocketOption] = Nil, connectTimeout: commons.OptArg[FiniteDuration] = OptArg.Empty, maxWriteSizeHint: commons.OptArg[Int] = 50000, reconnectionStrategy: RetryStrategy = ..., debugListener: DebugListener = DevNullListener)
- initCommands
commands always sent upon establishing a Redis connection (and every time it's reconnected). The most common reason to configure
initCommands
is to specify authentication password used by every connection (AUTH
command), but it's also useful for commands likeCLIENT SETNAME
,SELECT
, etc. Note that these are all commands that can't be executed directly by RedisNodeClient or RedisClusterClient.- actorName
name of the actor representing the connection
- localAddress
local bind address for the connection
- socketOptions
socket options for the connection
- connectTimeout
timeout for establishing connection
- maxWriteSizeHint
hint for maximum number of bytes sent in a single network write message (the actual number of bytes sent may be slightly larger)
- reconnectionStrategy
a RetryStrategy used to determine what delay should be used when reconnecting a failed connection. NOTE:
reconnectionStrategy
is ignored byRedisConnectionClient
- debugListener
listener for traffic going through this connection. Only for debugging and testing purposes
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val actorName: commons.OptArg[String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val connectTimeout: commons.OptArg[FiniteDuration]
- val debugListener: DebugListener
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val initCommands: RedisBatch[Any]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val localAddress: commons.OptArg[InetSocketAddress]
- val maxWriteSizeHint: commons.OptArg[Int]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val reconnectionStrategy: RetryStrategy
- val socketOptions: List[SocketOption]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )