Class

io.scalajs.npm.redis.RedisClient

RedisClientEvents

Related Doc: package RedisClient

Permalink

implicit final class RedisClientEvents extends AnyVal

Redis Client Events

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RedisClientEvents
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RedisClientEvents(client: RedisClient)

    Permalink

    client

    the given Redis client

Value Members

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

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

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

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val client: RedisClient

    Permalink

    the given Redis client

  6. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def onConnect(callback: Function): client.type

    Permalink

    client will emit connect as soon as the stream is connected to the server.

    client will emit connect as soon as the stream is connected to the server.

    Annotations
    @inline()
  9. def onDrain(callback: Function): client.type

    Permalink

    client will emit drain when the TCP connection to the Redis server has been buffering, but is now writable.

    client will emit drain when the TCP connection to the Redis server has been buffering, but is now writable. This event can be used to stream commands in to Redis and adapt to backpressure.

    If the stream is buffering client.should_buffer is set to true. Otherwise the variable is always set to false. That way you can decide when to reduce your send rate and resume sending commands when you get drain.

    You can also check the return value of each command as it will also return the backpressure indicator (deprecated). If false is returned the stream had to buffer.

    Annotations
    @inline()
  10. def onEnd(callback: Function): client.type

    Permalink

    client will emit end when an established Redis server connection has closed.

    client will emit end when an established Redis server connection has closed.

    Annotations
    @inline()
  11. def onError(callback: Function1[RedisError, Any]): client.type

    Permalink

    client will emit error when encountering an error connecting to the Redis server or when any other in node_redis occurs.

    client will emit error when encountering an error connecting to the Redis server or when any other in node_redis occurs. If you use a command without callback and encounter a ReplyError it is going to be emitted to the error listener.

    So please attach the error listener to node_redis.

    Annotations
    @inline()
  12. def onIdle(callback: Function): client.type

    Permalink

    client will emit idle when there are no outstanding commands that are awaiting a response.

    client will emit idle when there are no outstanding commands that are awaiting a response.

    Annotations
    @inline()
  13. def onMessage(callback: Function2[RedisChannel, RedisMessage, Any]): client.type

    Permalink

    TODO add documentation

    TODO add documentation

    Annotations
    @inline()
  14. def onMonitor(callback: Function3[RedisTime, Array[String], Any, Any]): client.type

    Permalink
    Annotations
    @inline()
  15. def onReady(callback: Function): client.type

    Permalink

    client will emit ready once a connection is established.

    client will emit ready once a connection is established. Commands issued before the ready event are queued, then replayed just before this event is emitted.

    Annotations
    @inline()
  16. def onReconnecting(callback: Function): client.type

    Permalink

    client will emit reconnecting when trying to reconnect to the Redis server after losing the connection.

    client will emit reconnecting when trying to reconnect to the Redis server after losing the connection. Listeners are passed an object containing delay (in ms) and attempt (the attempt #) attributes.

    Annotations
    @inline()
  17. def onSubscribe(callback: Function2[RedisChannel, RedisCount, Any]): client.type

    Permalink

    When a client issues a SUBSCRIBE or PSUBSCRIBE, that connection is put into a "subscriber" mode.

    When a client issues a SUBSCRIBE or PSUBSCRIBE, that connection is put into a "subscriber" mode. At that point, only commands that modify the subscription set are valid and quit (and depending on the redis version ping as well). When the subscription set is empty, the connection is put back into regular mode.

    If you need to send regular commands to Redis while in subscriber mode, just open another connection with a new client (hint: use client.duplicate()).

    Annotations
    @inline()
  18. def onWarning(callback: Function): client.type

    Permalink

    client will emit warning when password was set but none is needed and if a deprecated option / function / similar is used.

    client will emit warning when password was set but none is needed and if a deprecated option / function / similar is used.

    Annotations
    @inline()
  19. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped