Class/Object

io.keen.client.scala

BatchWriterClient

Related Docs: object BatchWriterClient | package scala

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    config

    Client configuration, by default loaded from application.conf.

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

    Permalink

    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

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

    Permalink

    Publish multiple events.

    Publish multiple events.

    events

    The events to add to the project.

    Definition Classes
    Writer
    See also

    Record multiple events API Reference

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val authority: String

    Permalink
    Definition Classes
    Client
  8. val batchSize: Integer

    Permalink

  9. val batchTimeout: FiniteDuration

    Permalink

  10. def clone(): AnyRef

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  19. val eventStore: EventStore

    Permalink
  20. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. val httpAdapter: HttpAdapter

    Permalink

    The concrete HttpAdapter used to make API requests.

    The concrete HttpAdapter used to make API requests.

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def isInfoEnabled: Boolean

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

    Permalink
    Definition Classes
    Any
  30. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  33. def loggerName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  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. val projectId: String

    Permalink

    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
  38. def queueEvent(collection: String, event: String): Unit

    Permalink

    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

  39. val scheduledThreadPool: Option[ScheduledThreadPoolExecutor]

    Permalink
    Attributes
    protected
  40. val scheme: String

    Permalink
    Definition Classes
    Client
  41. val sendInterval: FiniteDuration

    Permalink

  42. val sendIntervalEvents: Integer

    Permalink

  43. def sendQueuedEvents(): Unit

    Permalink

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

  44. def sendQueuedEventsAsync(): Unit

    Permalink

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

  45. val settings: Settings

    Permalink

    The client's configuration settings.

    The client's configuration settings.

    Definition Classes
    Client
  46. def shutdown(): Unit

    Permalink

    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
  47. val shutdownDelay: FiniteDuration

    Permalink

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  52. val version: String

    Permalink
    Definition Classes
    Client
  53. final def wait(): Unit

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  58. val writeKey: String

    Permalink

    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