Packages

c

com.avsystem.commons.redis

RedisNodeClient

final class RedisNodeClient extends RedisNodeExecutor with Closeable

Redis client implementation for a single Redis node using a connection pool. Connection pool size is constant and batches and operations are distributed over connections using round-robin scheme. Connections are automatically reconnected upon failure (possibly with an appropriate delay, see NodeConfig for details).

Self Type
RedisNodeClient
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RedisNodeClient
  2. Closeable
  3. AutoCloseable
  4. RedisNodeExecutor
  5. RedisOpExecutor
  6. RedisKeyedExecutor
  7. RedisExecutor
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RedisNodeClient(address: NodeAddress = NodeAddress.Default, config: NodeConfig = NodeConfig(), clusterNode: Boolean = false)(implicit system: ActorSystem)

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 address: NodeAddress
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def close(): Unit
    Definition Classes
    RedisNodeClient → Closeable → AutoCloseable
  8. val clusterNode: Boolean
  9. val config: NodeConfig
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def executeBatch[A](batch: RedisBatch[A], config: ExecutionConfig): commons.Future[A]

    Executes a RedisBatch on this client by sending its commands to the Redis node in a single network message (technically, a single akka.io.Tcp.Write message).

    Executes a RedisBatch on this client by sending its commands to the Redis node in a single network message (technically, a single akka.io.Tcp.Write message). Therefore it's also naturally guaranteed that all commands in a batch are executed on the same connection.

    Note that even though connection used by RedisNodeClient are automatically reconnected, it's still possible that an error is returned for some batches that were executed around the time connection failure happened. To be precise, ConnectionClosedException is returned for batches that were sent through the connection but the connection failed before a response could be received. There is no way to safely retry such batches because it is unknown whether Redis node actually received and executed them or not.

    Execution of each command in the batch or the whole batch may fail due to following reasons:

    Definition Classes
    RedisNodeClientRedisExecutor
  13. def executeOp[A](op: RedisOp[A], executionConfig: ExecutionConfig): commons.Future[A]

    Executes a RedisOp on this client.

    Executes a RedisOp on this client. RedisOp is a sequence of dependent RedisBatches, that requires an exclusive access to a single Redis connection. Typically, a RedisOp is a WATCH-MULTI-EXEC transaction (see RedisOp for more details).

    Note that the client does not handle optimistic lock failures (which happen when watched key is modified by other client). An OptimisticLockException is returned in such cases and you must recover from it manually.

    Execution of a RedisOp may also fail for the same reasons as specified for RedisBatch in executeBatch. Be especially careful when using node clients obtained from cluster client.

    Definition Classes
    RedisNodeClientRedisOpExecutor
  14. def executionContext: commons.ExecutionContext
    Definition Classes
    RedisNodeClientRedisExecutor
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def initialized: commons.Future[RedisNodeClient.this.type]

    Waits until all Redis connections are initialized and initOp is executed.

    Waits until all Redis connections are initialized and initOp is executed. Note that you can call executeBatch and executeOp even if the client is not yet initialized - requests will be internally queued and executed after initialization is complete.

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Closeable

Inherited from AutoCloseable

Inherited from RedisNodeExecutor

Inherited from RedisOpExecutor

Inherited from RedisKeyedExecutor

Inherited from RedisExecutor

Inherited from AnyRef

Inherited from Any

Ungrouped