Class

io.atlassian.event.stream

QueryAPI

Related Doc: package stream

Permalink

case class QueryAPI[F[_], KK, E, K, S, V](toStreamKey: (K) ⇒ KK, eventStore: EventStorage[F, KK, S, E], snapshotStore: SnapshotStorage[F, K, S, V], acc: (K) ⇒ (Snapshot[S, V], Event[KK, S, E]) ⇒ Snapshot[S, V]) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. QueryAPI
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QueryAPI(toStreamKey: (K) ⇒ KK, eventStore: EventStorage[F, KK, S, E], snapshotStore: SnapshotStorage[F, K, S, V], acc: (K) ⇒ (Snapshot[S, V], Event[KK, S, E]) ⇒ Snapshot[S, V])

    Permalink

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. val acc: (K) ⇒ (Snapshot[S, V], Event[KK, S, E]) ⇒ Snapshot[S, V]

    Permalink
  5. final def asInstanceOf[T0]: T0

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

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

    Permalink
    Definition Classes
    AnyRef
  8. val eventStore: EventStorage[F, KK, S, E]

    Permalink
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def forceRefreshPersistedSnapshot(key: K, forceStartAt: S)(implicit F: Monad[F], FC: Catchable[F]): F[\/[Error, Snapshot[S, V]]]

    Permalink

    Explicitly refresh persisted snapshot with events starting at forceStartAt.

    Explicitly refresh persisted snapshot with events starting at forceStartAt. Normally to refresh a snapshot, your implementation of QueryAPI can do so asynchronously via a custom onGenerateLatestSnapshot function.

    WARNING - Use this only if you know that events prior to forceStartAt can be safely ignored. Typically this is when a single event stream contains events for multiple entities, so obviously when you create a new entity, you can ignore all events prior to that creation event.

    key

    The key

    forceStartAt

    Generate a snapshot starting from events at the specified sequence number. This should only be used when it is known that preceding events can be ignored. For example when new entities are added, there are no views of those entities before the events that add them!

    returns

    Error when saving snapshot or the snapshot that was saved.

  11. def generateLatestSnapshot(key: K)(implicit F: Monad[F], FC: Catchable[F]): F[LatestSnapshotResult[S, V]]

    Permalink

    Generates the latest snapshot by retrieving the last persisted snapshot and then replaying events on top of that.

  12. def get(key: K, consistency: QueryConsistency)(implicit F: Monad[F], FC: Catchable[F]): F[Option[V]]

    Permalink

    Return the current view of the data for key 'key'

  13. def getAt(key: K, time: DateTime)(implicit F: Monad[F], FC: Catchable[F]): F[Option[V]]

    Permalink

    Return the view of the data for the key 'key' at the specified timestamp.

    Return the view of the data for the key 'key' at the specified timestamp.

    key

    The key

    time

    The timestamp at which we want to see the view of the data

    returns

    view of the data with events up to the given time stamp.

  14. def getAt(key: K, seq: S)(implicit F: Monad[F], FC: Catchable[F], S: Sequence[S]): F[Option[V]]

    Permalink

    Return the view of the data for the key 'key' at the specified sequence number.

    Return the view of the data for the key 'key' at the specified sequence number.

    key

    the key

    seq

    the sequence number of the event at which we want the see the view of the data.

    returns

    view of the data at event with sequence 'seq'

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getHistory(key: K, from: Option[S])(implicit F: Monad[F], FC: Catchable[F], S: Sequence[S]): F[Process[F, Snapshot[S, V]]]

    Permalink

    Get a stream of Snapshots starting from sequence number 'from' (if defined).

    Get a stream of Snapshots starting from sequence number 'from' (if defined).

    key

    The key

    from

    Starting sequence number. None to get from the beginning of the stream.

    returns

    a stream of Snapshots starting from sequence number 'from' (if defined).

  17. def getSnapshot(key: K, consistency: QueryConsistency)(implicit F: Monad[F], FC: Catchable[F]): F[Snapshot[S, V]]

    Permalink

    returns

    the current view wrapped in Snapshot of the data for key 'key'

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. def persistSnapshot(key: K, snapshot: Snapshot[S, V], previousSnapshot: Option[Snapshot[S, V]])(implicit F: Applicative[F]): F[\/[Error, Snapshot[S, V]]]

    Permalink

    Save the given snapshot if it is at a different sequence number to previousSnapshot.

    Save the given snapshot if it is at a different sequence number to previousSnapshot. Set previousSnapshot to None to force a save.

  23. val snapshotStore: SnapshotStorage[F, K, S, V]

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

    Permalink
    Definition Classes
    AnyRef
  25. val toStreamKey: (K) ⇒ KK

    Permalink
  26. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped