Class

com.avsystem.commons.redis.config

ConnectionConfig

Related Doc: package config

Permalink

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
Serializable, Serializable, Product, Equals, AnyRef, Any
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)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val actorName: commons.OptArg[String]

    Permalink

    name of the actor representing the connection

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val connectTimeout: commons.OptArg[FiniteDuration]

    Permalink

    timeout for establishing connection

  8. val debugListener: DebugListener

    Permalink

    listener for traffic going through this connection.

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

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. val initCommands: RedisBatch[Any]

    Permalink

    commands always sent upon establishing a Redis connection (and every time it's reconnected).

    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.

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val localAddress: commons.OptArg[InetSocketAddress]

    Permalink

    local bind address for the connection

  15. val maxWriteSizeHint: commons.OptArg[Int]

    Permalink

    hint for maximum number of bytes sent in a single network write message (the actual number of bytes sent may be slightly larger)

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. val reconnectionStrategy: RetryStrategy

    Permalink

    a RetryStrategy used to determine what delay should be used when reconnecting a failed connection.

    a RetryStrategy used to determine what delay should be used when reconnecting a failed connection. NOTE: reconnectionStrategy is ignored by RedisConnectionClient

  20. val socketOptions: List[SocketOption]

    Permalink

    socket options for the connection

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped