class InMemorySequencerStore extends SequencerStore

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InMemorySequencerStore
  2. SequencerStore
  3. AutoCloseable
  4. NamedLogging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new InMemorySequencerStore(loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def acknowledge(member: SequencerMemberId, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Unit]

    Write an acknowledgement that member has processed earlier timestamps.

    Write an acknowledgement that member has processed earlier timestamps. Only the latest timestamp needs to be stored. Earlier timestamps can be overwritten. Acknowledgements of earlier timestamps should be ignored.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  5. def adjustPruningTimestampForCounterCheckpoints(timestamp: CantonTimestamp, disabledMembers: Seq[SequencerMemberId])(implicit traceContext: TraceContext): Future[Option[CantonTimestamp]]

    This takes the timestamp that is considered safe to prune from and walks it back to ensure that we have retained enough events to be able to start subscriptions from the counter checkpoint immediately preceding the timestamp.

    This takes the timestamp that is considered safe to prune from and walks it back to ensure that we have retained enough events to be able to start subscriptions from the counter checkpoint immediately preceding the timestamp.

    Attributes
    protected[store]
    Definition Classes
    InMemorySequencerStoreSequencerStore
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. def close(): Unit
    Definition Classes
    InMemorySequencerStore → AutoCloseable
  9. def countRecords(implicit traceContext: TraceContext): Future[SequencerStoreRecordCounts]

    Count records currently stored by the sequencer.

    Count records currently stored by the sequencer. Used for pruning tests.

    Attributes
    protected[store]
    Definition Classes
    InMemorySequencerStoreSequencerStore
    Annotations
    @VisibleForTesting()
  10. def deleteEventsPastWatermark(instanceIndex: Int)(implicit traceContext: TraceContext): Future[Unit]

    No implementation as only required for crash recovery

    No implementation as only required for crash recovery

    Definition Classes
    InMemorySequencerStoreSequencerStore
  11. def disableMember(memberId: SequencerMemberId)(implicit traceContext: TraceContext): Future[Unit]

    Prevents member from sending and reading from the sequencer, and allows unread data for this member to be pruned.

    Prevents member from sending and reading from the sequencer, and allows unread data for this member to be pruned. It however won't stop any sends addressed to this member.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  15. final def evictFromCache(member: UnauthenticatedMemberId): Unit

    Evict unauthenticated member from the cache.

    Evict unauthenticated member from the cache.

    Attributes
    protected
    Definition Classes
    SequencerStore
  16. implicit val executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    InMemorySequencerStoreSequencerStore
  17. def fetchClosestCheckpointBefore(memberId: SequencerMemberId, counter: SequencerCounter)(implicit traceContext: TraceContext): Future[Option[CounterCheckpoint]]

    Fetch a checkpoint with a counter value less than the provided counter.

    Fetch a checkpoint with a counter value less than the provided counter.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  18. def fetchLowerBound()(implicit traceContext: TraceContext): Future[Option[CantonTimestamp]]

    Fetch the lower bound of events that can be read.

    Fetch the lower bound of events that can be read. Returns None if all events can be read.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  19. def fetchOnlineInstances(implicit traceContext: TraceContext): Future[SortedSet[Int]]

    There can be no other sequencers sharing this storage

    There can be no other sequencers sharing this storage

    Definition Classes
    InMemorySequencerStoreSequencerStore
  20. def fetchWatermark(instanceIndex: Int, retries: DbRetries = DbRetries())(implicit traceContext: TraceContext): Future[Option[Watermark]]

    Read the watermark for this sequencer and its online/offline status.

    Read the watermark for this sequencer and its online/offline status. Currently only used for testing.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  22. def goOffline(instanceIndex: Int)(implicit traceContext: TraceContext): Future[Unit]

    Flag that we're going offline (likely due to a shutdown)

    Flag that we're going offline (likely due to a shutdown)

    Definition Classes
    InMemorySequencerStoreSequencerStore
  23. def goOnline(instanceIndex: Int, now: CantonTimestamp)(implicit traceContext: TraceContext): Future[CantonTimestamp]

    Mark the sequencer as online and return a timestamp for when this sequencer can start safely producing events.

    Mark the sequencer as online and return a timestamp for when this sequencer can start safely producing events.

    now

    Now according to this sequencer's clock which will be used if it is ahead of the lowest available timestamp from other sequencers.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  25. def isEnabled(memberId: SequencerMemberId)(implicit traceContext: TraceContext): EitherT[Future, MemberDisabledError.type, Unit]

    Check whether the member is enabled.

    Check whether the member is enabled. Currently used when receiving a request for reading.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def latestAcknowledgements()(implicit traceContext: TraceContext): Future[Map[SequencerMemberId, CantonTimestamp]]

    Return the latest acknowledgements for all members

    Return the latest acknowledgements for all members

    Definition Classes
    InMemorySequencerStoreSequencerStore
  28. def locatePruningTimestamp(skip: NonNegativeInt)(implicit traceContext: TraceContext): Future[Option[CantonTimestamp]]

    Locate a timestamp relative to the earliest available event based on a skip index starting at 0.

    Locate a timestamp relative to the earliest available event based on a skip index starting at 0. Useful to monitor the progress of pruning and for pruning in batches.

    returns

    The timestamp of the (skip+1)'th event if it exists, None otherwise.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  29. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  30. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    InMemorySequencerStoreNamedLogging
  31. final def lookupMember(member: Member)(implicit traceContext: TraceContext): Future[Option[RegisteredMember]]

    Lookup an existing member id for the given member.

    Lookup an existing member id for the given member. Will return a cached value if available. Return scala.None if no id exists.

    Definition Classes
    SequencerStore
  32. def lookupMemberInternal(member: Member)(implicit traceContext: TraceContext): Future[Option[RegisteredMember]]

    Lookup member directly without caching.

    Lookup member directly without caching.

    Attributes
    protected
    Definition Classes
    InMemorySequencerStoreSequencerStore
  33. def markLaggingSequencersOffline(cutoffTime: CantonTimestamp)(implicit traceContext: TraceContext): Future[Unit]

    This store does not support multiple concurrent instances so will do nothing.

    This store does not support multiple concurrent instances so will do nothing.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  34. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  39. def prune(requestedTimestamp: CantonTimestamp, status: SequencerPruningStatus, payloadToEventMargin: NonNegativeFiniteDuration)(implicit traceContext: TraceContext): EitherT[Future, PruningError, SequencerPruningResult]

    Prune as much data as safely possible from before the given timestamp.

    Prune as much data as safely possible from before the given timestamp.

    requestedTimestamp

    the timestamp that we would like to prune up to (see docs on using the pruning status and disabling members for picking this value)

    status

    the pruning status that should be used for determining a safe to prune time for validation

    payloadToEventMargin

    the maximum time margin between payloads and events. once we have a safe to prune timestamp we simply prune all payloads at safeTimestamp - margin to ensure no payloads are removed where events will remain. typically sourced from SequencerWriterConfig.payloadToEventMargin.

    returns

    the timestamp up to which the database sequencer has been pruned (lower than requestedTimestamp) and a human readable report on what has been removed.

    Definition Classes
    SequencerStore
  40. def pruneCheckpoints(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Int]

    Prune counter checkpoints for the given member before the given timestamp.

    Prune counter checkpoints for the given member before the given timestamp.

    returns

    A lower bound on the number of checkpoints removed.

    Attributes
    protected[store]
    Definition Classes
    InMemorySequencerStoreSequencerStore
    Annotations
    @SuppressWarnings()
  41. def pruneEvents(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Int]

    Prune events before the given timestamp

    Prune events before the given timestamp

    returns

    a best efforts count of how many events were removed. this value can be less than the number of events actually removed if technical issues prevent a full count from being returned (e.g. with a database we may retry a delete after a connectivity issue and find that all events were successfully removed and have 0 rows removed returned).

    Attributes
    protected[store]
    Definition Classes
    InMemorySequencerStoreSequencerStore
  42. def prunePayloads(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Int]

    Prune payloads before the given timestamp

    Prune payloads before the given timestamp

    returns

    a best efforts count of how many events were removed. this value can be less than the number of payloads actually removed if technical issues prevent a full count from being returned.

    Attributes
    protected[store]
    Definition Classes
    InMemorySequencerStoreSequencerStore
  43. def readEvents(member: SequencerMemberId, fromTimestampO: Option[CantonTimestamp] = None, limit: Int = 100)(implicit traceContext: TraceContext): Future[ReadEvents]

    Read all events of which a member is a recipient from the provided timestamp but no greater than the earliest watermark.

    Read all events of which a member is a recipient from the provided timestamp but no greater than the earliest watermark.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  44. def registerMember(member: Member, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[SequencerMemberId]

    Register the provided member.

    Register the provided member. Should be idempotent if member is already registered and return the existing id.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  45. def saveCounterCheckpoint(memberId: SequencerMemberId, checkpoint: CounterCheckpoint)(implicit traceContext: TraceContext, closeContext: CloseContext): EitherT[Future, SaveCounterCheckpointError, Unit]

    Save a checkpoint that as of a certain timestamp the member has this counter value.

    Save a checkpoint that as of a certain timestamp the member has this counter value. Any future subscriptions can then use this as a starting point for serving their event stream rather than starting from 0.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  46. def saveEvents(instanceIndex: Int, eventsToInsert: NonEmpty[Seq[Sequenced[PayloadId]]])(implicit traceContext: TraceContext): Future[Unit]

    Save a series of events to the store.

    Save a series of events to the store. Callers should determine batch size. No batching is done within the store. Callers MUST ensure that event-ids are unique as no errors will be returned if a duplicate is present (for the sequencer writer see sequencer.PartitionedTimestampGenerator for use with their instance index).

    Definition Classes
    InMemorySequencerStoreSequencerStore
  47. def saveLowerBound(ts: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[Future, SaveLowerBoundError, Unit]

    Save an updated lower bound of events that can be read.

    Save an updated lower bound of events that can be read. Must be equal or greater than any prior set lower bound.

    Definition Classes
    InMemorySequencerStoreSequencerStore
    Exceptions thrown

    java.lang.IllegalArgumentException if timestamp is lower than existing lower bound

  48. def savePayloads(payloadsToInsert: NonEmpty[Seq[Payload]], instanceDiscriminator: UUID)(implicit traceContext: TraceContext): EitherT[Future, SavePayloadsError, Unit]

    Save a series of payloads to the store.

    Save a series of payloads to the store. Is up to the caller to determine a reasonable batch size and no batching is done within the store.

    instanceDiscriminator

    a unique ephemeral value to ensure that no other sequencer instances are writing conflicting payloads without having to check the payload body

    Definition Classes
    InMemorySequencerStoreSequencerStore
  49. def saveWatermark(instanceIndex: Int, ts: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[Future, SaveWatermarkError, Unit]

    Write the watermark that we promise not to write anything earlier than.

    Write the watermark that we promise not to write anything earlier than. Does not indicate that there is an event written by this sequencer for this timestamp as there may be no activity at the sequencer, but updating the timestamp allows the sequencer to indicate that it's still alive. Return an error if we find our sequencer is offline.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  50. def status(now: CantonTimestamp)(implicit traceContext: TraceContext): Future[SequencerPruningStatus]

    Build a status object representing the current state of the sequencer.

    Build a status object representing the current state of the sequencer.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  51. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. def unregisterUnauthenticatedMember(member: UnauthenticatedMemberId)(implicit traceContext: TraceContext): Future[Unit]

    Unregister a disabled unauthenticated member.

    Unregister a disabled unauthenticated member. This should delete the member from the store.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  54. def validateCommitMode(configuredCommitMode: CommitMode)(implicit traceContext: TraceContext): EitherT[Future, String, Unit]

    Validate that the commit mode of a session is inline with the configured expected commit mode.

    Validate that the commit mode of a session is inline with the configured expected commit mode. Return a human readable message about the mismatch in commit modes if not.

    Definition Classes
    InMemorySequencerStoreSequencerStore
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from SequencerStore

Inherited from AutoCloseable

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped