scredis.commands

TransactionalCommands

trait TransactionalCommands extends AnyRef

This trait implements transactional commands and pipelining.

Self Type
Client
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TransactionalCommands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val Never: Infinite

    Attributes
    protected
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. def multi()(implicit opts: CommandOptions = DefaultCommandOptions): TransactionalClient

    Creates and returns a scredis.TransactionalClient used to perform a transaction.

    Creates and returns a scredis.TransactionalClient used to perform a transaction. Calling exec() on scredis.TransactionalClient triggers the execution of all queued commands as part of a Redis transaction.

    returns

    scredis.TransactionalClient

    Since

    2.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if a previous transaction is still running, i.e. if exec() has not been called on a previous multi()

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

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

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

    Definition Classes
    AnyRef
  19. def pipeline(): PipelineClient

    Creates and returns a scredis.PipelineClient used to send multiple commands at once.

    Creates and returns a scredis.PipelineClient used to send multiple commands at once. Calling sync() on scredis.PipelineClient triggers the execution of all queued commands.

    returns

    scredis.PipelineClient

    Since

    1.0.0

  20. def pipelined(body: (PipelineClient) ⇒ Any)(implicit opts: CommandOptions = DefaultCommandOptions): IndexedSeq[Try[Any]]

    Pipelines multiple commands and returns the results.

    Pipelines multiple commands and returns the results.

    body

    function to be executed with the provided scredis.PipelineClient

    returns

    an indexed sequence containing the results of the issued commands in the same order they were queued

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisProtocolException]]

    if sync() is called on the scredis.PipelineClient within body

    Note

    The sync() method must not be called within body as it will automatically be called immediately after body returns.

  21. def pipelined1[A](body: (PipelineClient) ⇒ Future[A])(implicit opts: CommandOptions = DefaultCommandOptions): A

    Pipelines multiple commands and returns the result of one command returned by body.

    Pipelines multiple commands and returns the result of one command returned by body.

    body

    function to be executed with the provided scredis.PipelineClient

    returns

    an indexed sequence containing the results of the issued commands in the same order they were queued

    Since

    1.0.0

    Note

    It is safe to call sync() within body as the library will detect whether it has already been called and won't call it a second time.

  22. def pipelinedM[K, V](body: (PipelineClient) ⇒ Map[K, Future[V]])(implicit opts: CommandOptions = DefaultCommandOptions, ec: ExecutionContext): Map[K, V]

    Pipelines multiple commands and returns the results as a map of key to command result pairs.

    Pipelines multiple commands and returns the results as a map of key to command result pairs.

    body

    function to be executed with the provided scredis.PipelineClient

    returns

    map of key to command pairs

    Since

    1.0.0

    Note

    It is safe to call sync() within body as the library will detect whether it has already been called and won't call it a second time.

  23. def pipelinedN[A, B[_] <: Traversable[_]](body: (PipelineClient) ⇒ B[Future[A]])(implicit opts: CommandOptions = DefaultCommandOptions, cbf: CanBuildFrom[B[Future[A]], A, B[A]], ec: ExecutionContext): B[A]

    Pipelines multiple commands and returns the results of several commands returned by body.

    Pipelines multiple commands and returns the results of several commands returned by body.

    body

    function to be executed with the provided scredis.PipelineClient

    returns

    collection containing the results of the issued commands in the same order they were queued

    Since

    1.0.0

    Note

    It is safe to call sync() within body as the library will detect whether it has already been called and won't call it a second time.

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

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. def transactional(body: (TransactionalClient) ⇒ Any)(implicit opts: CommandOptions = DefaultCommandOptions): IndexedSeq[Try[Any]]

    Performs multiple commands as part of a Redis transaction and returns the results.

    Performs multiple commands as part of a Redis transaction and returns the results.

    body

    function to be executed with the provided scredis.TransactionalClient

    returns

    an indexed sequence containing the results of the issued commands in the same order they were queued

    Since

    2.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisProtocolException]]

    if exec() is called on the scredis.TransactionalClient within body

    [[scredis.exceptions.RedisTransactionException]]

    if the transaction is discarded within body or if a watched key has been modified by another client

    Note

    The exec() method must not be called within body as it will automatically be called immediately after body returns.

  27. def transactional1[A](body: (TransactionalClient) ⇒ Future[A])(implicit opts: CommandOptions = DefaultCommandOptions): A

    Performs multiple commands as part of a Redis transaction and returns the result of the command returned by body.

    Performs multiple commands as part of a Redis transaction and returns the result of the command returned by body.

    body

    function to be executed with the provided scredis.TransactionalClient

    returns

    an indexed sequence containing the results of the issued commands in the same order they were queued

    Since

    2.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisTransactionException]]

    if a watched key has been modified by another client

    Note

    It is safe to call exec() within body as the library will detect whether it has already been called and won't call it a second time.

  28. def transactionalM[K, V](body: (TransactionalClient) ⇒ Map[K, Future[V]])(implicit opts: CommandOptions = DefaultCommandOptions, ec: ExecutionContext): Map[K, V]

    Performs multiple commands as part of a Redis transaction and returns the results as a map of key to command result pairs.

    Performs multiple commands as part of a Redis transaction and returns the results as a map of key to command result pairs.

    body

    function to be executed with the provided scredis.TransactionalClient

    returns

    map of key to command pairs

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisTransactionException]]

    if a watched key has been modified by another client

    Note

    It is safe to call exec() within body as the library will detect whether it has already been called and won't call it a second time.

  29. def transactionalN[A, B[_] <: Traversable[_]](body: (TransactionalClient) ⇒ B[Future[A]])(implicit opts: CommandOptions = DefaultCommandOptions, cbf: CanBuildFrom[B[Future[A]], A, B[A]], ec: ExecutionContext): B[A]

    Performs multiple commands as part of a Redis transaction and returns the results of several commands returned by body.

    Performs multiple commands as part of a Redis transaction and returns the results of several commands returned by body.

    body

    function to be executed with the provided scredis.TransactionalClient

    returns

    an indexed sequence containing the results of the issued commands in the same order they were queued

    Since

    2.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisTransactionException]]

    if a watched key has been modified by another client

    Note

    It is safe to call exec() within body as the library will detect whether it has already been called and won't call it a second time.

  30. def unWatch()(implicit opts: CommandOptions = DefaultCommandOptions): Unit

    Forgets about all watched keys.

    Forgets about all watched keys.

    Since

    2.0.0

  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def watch(key: String, keys: String*)(implicit opts: CommandOptions = DefaultCommandOptions): Unit

    Watches the given keys, which upon modification, will abort a transaction.

    Watches the given keys, which upon modification, will abort a transaction.

    key

    key to watch

    keys

    additional keys to watch

    Since

    2.0.0

Inherited from AnyRef

Inherited from Any

Ungrouped