io.keen.client.scala

BatchWriterClient

class BatchWriterClient extends Client with Writer

A BatchWriterClient is a Client specialized with the capability to write events to the Keen API in batches per request.

Each instance creates a threadpool and schedules flush operations on it, which will make bulk write calls to the Keen IO API for batches of events until the queue is drained.

Events are queued for batch submission with queueEvent; other operations like addEvent function as with an ordinary Client with Writer—that is, they are non-blocking but effect discrete API calls per invocation.

Batch size, flush scheduling, queue bounds, etc. can be tuned via the settings under the keen.queue property tree.

Source
BatchWriterClient.scala
To do

Explain the difference in behavior if send-interval is zero seconds.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BatchWriterClient
  2. Writer
  3. AccessLevel
  4. Client
  5. Logging
  6. HttpAdapterComponent
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BatchWriterClient(config: Config = ...)

    config

    Client configuration, by default loaded from application.conf.

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. def addEvent(collection: String, event: String): Future[Response]

    Publish a single event.

    Publish a single event.

    collection

    The collection to which the event will be added.

    event

    The event

    Definition Classes
    Writer
    See also

    Record a single event API Reference

  7. def addEvents(events: String): Future[Response]

    Publish multiple events.

    Publish multiple events.

    events

    The events to add to the project.

    Definition Classes
    Writer
    See also

    Record multiple events API Reference

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val authority: String

    Definition Classes
    Client
  10. val batchSize: Integer

  11. val batchTimeout: FiniteDuration

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def debug(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  14. def debug(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  15. def doRequest(path: String, method: String, key: String, body: Option[String] = None, params: Map[String, Option[String]] = Map.empty): Future[Response]

    Attributes
    protected
    Definition Classes
    AccessLevel
  16. val environment: Option[String]

    Definition Classes
    Client
  17. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  19. def error(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  20. def error(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  21. val eventStore: EventStore

  22. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  25. val httpAdapter: HttpAdapter

    The concrete HttpAdapter used to make API requests.

    The concrete HttpAdapter used to make API requests.

    Definition Classes
    ClientHttpAdapterComponent
  26. def info(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  27. def info(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  28. def isDebugEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  29. def isErrorEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  30. def isInfoEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. def isTraceEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  33. def isWarnEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  34. def logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  35. def loggerName: String

    Attributes
    protected
    Definition Classes
    Logging
  36. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  39. val projectId: String

    Project identifier for the Keen project that an AccessLevel's API key is associated with.

    Project identifier for the Keen project that an AccessLevel's API key is associated with.

    Definition Classes
    AccessLevel
  40. def queueEvent(collection: String, event: String): Unit

    Queue an event for batched publishing.

    Queue an event for batched publishing.

    collection

    The collection to which the event will be added.

    event

    The event

  41. val scheduledThreadPool: Option[ScheduledThreadPoolExecutor]

    Attributes
    protected
  42. val scheme: String

    Definition Classes
    Client
  43. val sendInterval: FiniteDuration

  44. val sendIntervalEvents: Integer

  45. def sendQueuedEvents(): Unit

    Flush queued events, removing them from the queue as they are successfully sent.

  46. def sendQueuedEventsAsync(): Unit

    Flush queued events, sending them to Keen IO on a background thread.

  47. val settings: Settings

    The client's configuration settings.

    The client's configuration settings.

    Definition Classes
    Client
  48. def shutdown(): Unit

    Shut down the threadpool for flushing batch writes, before a final flush of all events remaining in the queue, run on the main thread.

    Shut down the threadpool for flushing batch writes, before a final flush of all events remaining in the queue, run on the main thread.

    Definition Classes
    BatchWriterClientClient
  49. val shutdownDelay: FiniteDuration

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

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def trace(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  53. def trace(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  54. val version: String

    Definition Classes
    Client
  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def warn(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  59. def warn(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  60. val writeKey: String

    A write key required to make API calls that write data.

    A write key required to make API calls that write data.

    Definition Classes
    Writer

Inherited from Writer

Inherited from AccessLevel

Inherited from Client

Inherited from Logging

Inherited from HttpAdapterComponent

Inherited from AnyRef

Inherited from Any

Ungrouped