Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package avsystem
    Definition Classes
    com
  • package commons
    Definition Classes
    avsystem
  • package redis
    Definition Classes
    commons
  • object RedisApi

    Object which contains implementations of various variants of Redis API that this driver provides.

    Object which contains implementations of various variants of Redis API that this driver provides. Each variant implements a set of methods corresponding directly to Redis commands, e.g. get method represents Redis GET command.

    API variants may differ from each other in several independent aspects:

    The most important one is the result type returned by every method corresponding to a Redis command:

    Async and Blocking API variants additionally come in three different "levels", each one exposing different subset of Redis commands. This reflects the fact that not every RedisExecutor (client implementation) supports every command (e.g. you can't execute unkeyed commands using RedisClusterClient).

    • Variants from RedisApi.Keyed include only commands with keys (so that they can be executed on Redis Cluster)
    • Variants from RedisApi.Node include only commands which don't access connection state
    • Variants from RedisApi.Connection include all commands supported by the driver

    Every API variant may also use different types to represent Redis keys, hash keys and values. You can define your own API variants for arbitrary combination of key, hash key and value types as long as there is an instance of RedisDataCodec for every of these types. Also, it is possible to customize Record type which is used primarily for entries in Redis Stream API. Record type requires RedisRecordCodec instance.

    Key, field, value and record types and their serialization typeclass instances are enapsulated by RedisSerialization instances. API variants are then parameterized with them.

    API variants which use only Strings (textual) or only ByteStrings (binary) are already implemented by the driver, e.g. RedisApi.Keyed.Async.StringTyped, RedisApi.Batches.BinaryTyped.

    Note that RedisDataCodec is automatically provided for many simple types and also all types which have a GenCodec. This effectively gives you a complete serialization framework for keys, hash keys and values stored in Redis.

    Note that chosen key, hash key and value types can be adjusted "on the fly" with a convenient syntax. For example, if you need to use some case class as a value type in a single, specific place, you can do it without defining a completely separate API variant. For example:

    case class Person(name: String, birthYear: Int)
    object Person {
      implicit val codec: GenCodec[Person] = GenCodec.materialize[Person]
    }
    
    import scala.concurrent.duration._
    implicit val system: ActorSystem = ActorSystem()
    
    val api = RedisApi.Keyed.Blocking.StringTyped(new RedisClusterClient)
    
    // normally, we're just using String-typed API
    api.set("key", "value")
    
    // but in one specific place, we might want to use Person as the value
    // Person has an instance of GenCodec, so it will be automatically serialized to binary format
    api.valueType[Person].set("binaryDataKey", Person("Fred", 1990))
    Definition Classes
    redis
  • Batches
  • Connection
  • Keyed
  • Node
  • Raw

object Node extends ExecutedApis

Entry point for API variants which expose node-level commands, i.e. the ones that don't access or modify Redis connection state.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Node
  2. ExecutedApis
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class BaseAsync[S <: RedisSerialization] extends AbstractRedisApi[S] with RedisAsyncApi
    Attributes
    protected
    Definition Classes
    ExecutedApis
  2. abstract class BaseBlocking[S <: RedisSerialization] extends AbstractRedisApi[S] with RedisBlockingApi
    Attributes
    protected
    Definition Classes
    ExecutedApis
  3. abstract class VariantCompanion[Variant[S <: RedisSerialization] <: AbstractRedisApi[S]] extends AnyRef
    Definition Classes
    ExecutedApis
  4. case class Async[S <: RedisSerialization](serialization: S, executor: RequiredExecutor, execConfig: ExecutionConfig) extends BaseAsync[S] with RedisRecoverableNodeApi with Product with Serializable
  5. case class Blocking[S <: RedisSerialization](serialization: S, executor: RequiredExecutor, execConfig: ExecutionConfig) extends BaseBlocking[S] with RedisRecoverableNodeApi with Product with Serializable
  6. type RequiredExecutor = RedisNodeExecutor
    Definition Classes
    NodeExecutedApis

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  20. object Async extends VariantCompanion[Async] with Serializable
    Definition Classes
    NodeExecutedApis
  21. object Blocking extends VariantCompanion[Blocking] with Serializable
    Definition Classes
    NodeExecutedApis

Inherited from ExecutedApis

Inherited from AnyRef

Inherited from Any

Ungrouped