Trait

io.keen.client.scala

EventStore

Related Doc: package scala

Permalink

trait EventStore extends AnyRef

An EventStore is an abstract store for events, intended primarily as a write cache for events to be flushed in batches, such as by a BatchWriterClient.

The documentation refers to "handles", which you can think of simply as cache keys or map keys in common parlance. The parameter naming is historical.

Source
EventStore.scala
To do

The data structure should be generalized from TrieMap & ListBuffer

,

The handle/key type could be generic instead of Long.

,

I'd like to change parameter names to key before 1.0.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EventStore
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def get(handle: Long): String

    Permalink

    Retrieves an event from the store.

    Retrieves an event from the store.

    handle

    The cache key of the event to retrieve.

    returns

    The event string.

    To do

    Non-Option instance apply() version could be added for idiomatic Scala.

    ,

    Should return an Option[String] in Scala land.

  2. abstract def getHandles(projectId: String): TrieMap[String, ListBuffer[Long]]

    Permalink

    Retrieves all handles for a specific project from the store.

    Retrieves all handles for a specific project from the store.

    projectId

    The ID of the project.

    returns

    A map of collection names to their event handles.

  3. abstract def remove(handle: Long): Unit

    Permalink

    Removes an event from the store.

    Removes an event from the store.

    handle

    The handle of the event.

  4. abstract def store(projectId: String, eventCollection: String, event: String): Long

    Permalink

    Stores an event in the store.

    Stores an event in the store.

    projectId

    The ID of the project to which the collection belongs.

    eventCollection

    The collection to which the event will be added.

    event

    The event.

    returns

    A handle which can be used to retrieve or remove the event from the store (a cache key).

Concrete 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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  12. var maxEventsPerCollection: Integer

    Permalink

    Sets a maximum number of events that should be stored per-collection.

    Sets a maximum number of events that should be stored per-collection. Eviction strategy may vary by implementation.

    To do

    This could be moved to RamEventStore instead of being a formal part of the interface.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. var size: Integer

    Permalink

    The number of events currently in the store.

    The number of events currently in the store.

    To do

    Long? The implementation in RamEventStore uses Longs for key/handle/ID, so…

    ,

    This should be an accessor method with private field, not public var.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped