Class

curiodb

AggregateSortedSetStore

Related Doc: package curiodb

Permalink

class AggregateSortedSetStore extends AggregateSetReducer[IndexedTreeMap[String, Int]]

Aggregate for all of the sorted set commands, namely ZINTERSTORE/ZUNIONSTORE. It is very different from its AggregateSetStore counterpart, given the AGGREGATE/WEIGHTS args it supports.

Linear Supertypes
AggregateSetReducer[IndexedTreeMap[String, Int]], Aggregate[IndexedTreeMap[String, Int]], ActorLogging, CommandProcessing, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AggregateSortedSetStore
  2. AggregateSetReducer
  3. Aggregate
  4. ActorLogging
  5. CommandProcessing
  6. Actor
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AggregateSortedSetStore()

    Permalink

Type Members

  1. type CommandRunner = PartialFunction[String, Any]

    Permalink

    Signature for the partial function CommandRunner that actually handles each command.

    Signature for the partial function CommandRunner that actually handles each command. Every Node must implement the "run" method of this type (this requirement is actually codified in the base Node class). It takes a case statement mapping command names to the code that handles them - typically handled inline, or via a method if more complex. The result will then be sent back to the calling ClientNode, and converted into a Redis response before being sent back to the client socket. One special case is the handler returning Unit, in which case no response is sent back, in which case it's up to the handling code to manually send a response back to the client node. A common example of this is all of the aggregation commands, which need to coordinate with multiple nodes before calculating a response. But the bulk of commands are simple one-liners directly returning a response.

    Definition Classes
    CommandProcessing
  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor
  3. type S = Set[String]

    Permalink
    Definition Classes
    AggregateSetReducer

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. def aggregate(props: Props): Unit

    Permalink

    Shortcut for creating Aggregate actors.

    Shortcut for creating Aggregate actors.

    Definition Classes
    CommandProcessing
  5. lazy val aggregate: (Int, Int) ⇒ Int

    Permalink

    The actual operation that will be performed given the AGGREGATE arg in the original Command.

  6. lazy val aggregateName: String

    Permalink

    Value of the AGGREGATE arg in the original Command.

  7. lazy val aggregatePos: Int

    Permalink

    Position of the AGGREGATE arg in the original Command.

  8. def args: Seq[String]

    Permalink

    Shortcut to the args of the current command.

    Shortcut to the args of the current command.

    Definition Classes
    CommandProcessing
  9. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  11. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  12. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  13. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. def begin(): Unit

    Permalink

    Starts the aggregation process by sending a Command containing the Aggregate subclass instance's command, for each key in the originating Command.

    Starts the aggregation process by sending a Command containing the Aggregate subclass instance's command, for each key in the originating Command.

    Definition Classes
    Aggregate
  16. def bounds(from: Int, to: Int, size: Int): (Int, Int)

    Permalink

    Utility for handling boundary args that wrap around ends of sequences and count backwards when negative.

    Utility for handling boundary args that wrap around ends of sequences and count backwards when negative.

    Definition Classes
    CommandProcessing
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. var command: Command

    Permalink

    The current command - normally will be set when a Command arrives via the actor's receive method.

    The current command - normally will be set when a Command arrives via the actor's receive method.

    Definition Classes
    CommandProcessing
  19. val commandName: String

    Permalink
    Definition Classes
    Aggregate
  20. val commandTimeout: Int

    Permalink

    Timeout for a single command.

    Timeout for a single command. Used by ClientNode to schedule timeout handlers for commands, and also in ScriptRunner to determine what the timeout for a Lua script should be.

    Definition Classes
    CommandProcessing
  21. var commands: Seq[Command]

    Permalink

    Sequence of Command instances that are initially sent when aggregation begins.

    Sequence of Command instances that are initially sent when aggregation begins. These are stored so we can order the responses received by mapping them back to Command IDs.

    Definition Classes
    Aggregate
  22. def complete(): Unit

    Permalink

    Reduces results based on the AGGREGATE/WEIGHT args in the original Command, storing the reduced results in the appropriate Node, and aborting sending a response which will be handled by the final Node being written to.

    Reduces results based on the AGGREGATE/WEIGHT args in the original Command, storing the reduced results in the appropriate Node, and aborting sending a response which will be handled by the final Node being written to.

    Definition Classes
    AggregateSortedSetStoreAggregate
  23. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  24. val debug: Boolean

    Permalink

    Flag that enables detailed command debugging.

    Flag that enables detailed command debugging.

    Definition Classes
    CommandProcessing
  25. def durationSetting(name: String): Int

    Permalink

    Retrieves a duration config setting as milliseconds, and handles the value not being a duration value, so we can do something like set it to "off", in which case we default to 0.

    Retrieves a duration config setting as milliseconds, and handles the value not being a duration value, so we can do something like set it to "off", in which case we default to 0.

    Definition Classes
    CommandProcessing
  26. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  32. def keys: Seq[String]

    Permalink

    Ordered set of keys dealt with by the initial Command, used to construct the list of commands being sent.

    Ordered set of keys dealt with by the initial Command, used to construct the list of commands being sent.

    Definition Classes
    Aggregate
  33. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  37. def numberToString(n: Any): String

    Permalink

    Utility for dropping extraneous zeros from floats when converting to strings, for consistency with Redis' INCRBYFLOAT/HINCRBYFLOAT commands and sorted set scores.

    Utility for dropping extraneous zeros from floats when converting to strings, for consistency with Redis' INCRBYFLOAT/HINCRBYFLOAT commands and sorted set scores.

    Definition Classes
    CommandProcessing
  38. def ordered: Seq[IndexedTreeMap[String, Int]]

    Permalink

    Returns responses ordered by their original Command order.

    Returns responses ordered by their original Command order.

    Definition Classes
    Aggregate
  39. def pattern(values: Iterable[String], pattern: String): Iterable[String]

    Permalink

    Utility for glob-style filtering.

    Utility for glob-style filtering.

    Definition Classes
    CommandProcessing
  40. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  41. def postStop(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  42. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  43. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  44. def randomItem(iterable: Iterable[String]): String

    Permalink

    Utility for selecting a random item.

    Utility for selecting a random item.

    Definition Classes
    CommandProcessing
  45. def receive: Receive

    Permalink

    Starts the aggregation process when the original Command is first received, and receives each Node response afterwards, until all responses have arrived, at which point the final response for the ClientNode is constructed and sent back, and the Aggregate actor is shut down.

    Starts the aggregation process when the original Command is first received, and receives each Node response afterwards, until all responses have arrived, at which point the final response for the ClientNode is constructed and sent back, and the Aggregate actor is shut down.

    Definition Classes
    Aggregate → Actor
  46. lazy val reducer: (S, S) ⇒ S

    Permalink
    Definition Classes
    AggregateSetReducer
  47. def respond(response: Any): Unit

    Permalink

    Sends a Response (usually the result of a command) back to the command's destination (usually a ClientNode sending a Command).

    Sends a Response (usually the result of a command) back to the command's destination (usually a ClientNode sending a Command).

    Definition Classes
    CommandProcessing
  48. var responses: Map[String, IndexedTreeMap[String, Int]]

    Permalink

    Responses received mapped to Command IDs.

    Responses received mapped to Command IDs.

    Definition Classes
    Aggregate
  49. def route(input: Seq[Any], client: Option[ActorRef] = None): Unit

    Permalink

    Shortcut route method for sending command input without a constructed Command instance, using the state of the current command (eg: db, clientID).

    Shortcut route method for sending command input without a constructed Command instance, using the state of the current command (eg: db, clientID).

    Definition Classes
    CommandProcessing
  50. def route(command: Command): Unit

    Permalink

    Sends an unrouted Command to one or more KeyNode actors, either by routing by key, or broadcasting to all.

    Sends an unrouted Command to one or more KeyNode actors, either by routing by key, or broadcasting to all.

    Definition Classes
    CommandProcessing
  51. def scan(values: Iterable[String]): Seq[String]

    Permalink

    Utility for scan-style commands, namely SCAN/SSCAN/HSCAN/ZSCAN.

    Utility for scan-style commands, namely SCAN/SSCAN/HSCAN/ZSCAN.

    Definition Classes
    CommandProcessing
  52. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  53. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  54. def slice[T](value: Seq[T]): Seq[T]

    Permalink

    Utility for slicing sequences, for commands such as SLICE, GETRANGE, LRANGE, etc.

    Utility for slicing sequences, for commands such as SLICE, GETRANGE, LRANGE, etc.

    Definition Classes
    CommandProcessing
  55. def stop(): Unit

    Permalink

    Stops the actor - we define this shortcut to give subclassing traits the chance to override it and inject extra shutdown behavior that concrete actors need not know about.

    Stops the actor - we define this shortcut to give subclassing traits the chance to override it and inject extra shutdown behavior that concrete actors need not know about. Note we wrap context.stop with Try here since it may be called twice due to transaction timeouts.

    Definition Classes
    CommandProcessing
  56. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  58. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  59. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  60. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def weight(i: Int): Int

    Permalink

    Weight value to use, defaults to 1 if WEIGHT arg not defined.

  64. lazy val weightPos: Int

    Permalink

    Postition of the WEIGHT arg in the original Command.

Inherited from AggregateSetReducer[IndexedTreeMap[String, Int]]

Inherited from Aggregate[IndexedTreeMap[String, Int]]

Inherited from ActorLogging

Inherited from CommandProcessing

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped