Packages

c

com.avsystem.commons.redis.config

ConnectionConfig

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 like CLIENT 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 by RedisConnectionClient

debugListener

listener for traffic going through this connection. Only for debugging and testing purposes

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConnectionConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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 like CLIENT 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 by RedisConnectionClient

    debugListener

    listener for traffic going through this connection. Only for debugging and testing purposes

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val actorName: commons.OptArg[String]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. val connectTimeout: commons.OptArg[FiniteDuration]
  8. val debugListener: DebugListener
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. val initCommands: RedisBatch[Any]
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val localAddress: commons.OptArg[InetSocketAddress]
  15. val maxWriteSizeHint: commons.OptArg[Int]
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. val reconnectionStrategy: RetryStrategy
  20. val socketOptions: List[SocketOption]
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped