package store
- Alphabetic
- Public
- Protected
Type Members
- final case class BytesPayload(id: PayloadId, content: ByteString) extends Payload with Product with Serializable
Payload with a assigned id and content as bytes
- class DbSequencerStore extends SequencerStore with DbSequencerStorePruning with DbStore with NamedLogging with FlagCloseable
Database backed sequencer store.
Database backed sequencer store. Supports many concurrent instances reading and writing to the same backing database.
- trait DbSequencerStorePruning extends AnyRef
- class DbSequencerSynchronizerConfigurationStore extends SequencerSynchronizerConfigurationStore with DbStore
- final case class DeliverErrorStoreEvent(sender: SequencerMemberId, messageId: MessageId, error: Option[ByteString], traceContext: TraceContext, trafficReceiptO: Option[TrafficReceipt]) extends StoreEvent[Nothing] with Product with Serializable
- final case class DeliverStoreEvent[P](sender: SequencerMemberId, messageId: MessageId, members: NonEmpty[SortedSet[SequencerMemberId]], payload: P, topologyTimestampO: Option[CantonTimestamp], traceContext: TraceContext, trafficReceiptO: Option[TrafficReceipt]) extends StoreEvent[P] with Product with Serializable
Structure for storing a deliver events.
Structure for storing a deliver events.
- members
should include the sender and event recipients as they all will read the event
- topologyTimestampO
The timestamp of the snapshot to be used for determining the signing key of this event, resolving group addresses, and for checking signatures on envelopes scala.None means that the sequencing timestamp should be used.
- class EventsBuffer extends NamedLogging
This in-memory fan-out buffer allows a DatabaseSequencer.single(...) instance to fully bypass reading events back from the database, since there's only a single writer.
This in-memory fan-out buffer allows a DatabaseSequencer.single(...) instance to fully bypass reading events back from the database, since there's only a single writer.
Multiple readers may request an immutable snapshot of the buffer at any time. We use immutable scala.collection.immutable.Vector to allow efficient random access to find the reading start point using binary search.
The user of this buffer is responsible for providing the events in the right order.
The buffer is configured with a memory limit and only holds events up to this limit. The memory used by an event is merely an approximated value and not intended to be very precise, see com.digitalasset.canton.synchronizer.sequencer.store.EventsBuffer.approximateEventSize. There is no direct bound on the number of events that can be buffered, as long as the total sum of the memory used by all events is below the memory limit. This means there could be a few very big events or a lot of small events, or anything in between.
There are some invariants/restrictions:
- The EventsBuffer always keeps at least 1 element, even if the single event exceeds the memory limit.
- After adding elements to the buffer, old elements are removed from the buffer until the memory usage drops below the memory limit.
- Only a single process may write to the buffer.
- Annotations
- @SuppressWarnings()
- final case class FilteredBatch(id: PayloadId, batch: Batch[ClosedEnvelope]) extends Payload with Product with Serializable
- class HASequencerWriterStore extends SequencerWriterStore with FlagCloseable with NamedLogging
Sequencer writer storage intended to use a resource.DbStorageMulti.
- sealed trait IdOrPayload extends AnyRef
- class InMemorySequencerStore extends SequencerStore
- class InMemorySequencerSynchronizerConfigurationStore extends SequencerSynchronizerConfigurationStore
- sealed trait Payload extends IdOrPayload
- final case class PayloadId(id: CantonTimestamp) extends IdOrPayload with PrettyPrinting with Product with Serializable
Identifier for a payload.
Identifier for a payload. Should ideally be unique however this will be validated in SequencerStore.savePayloads. Is expected id is a timestamp in microseconds.
- final case class Presequenced[+E <: StoreEvent[_]](event: E, maxSequencingTimeO: Option[CantonTimestamp], blockSequencerTimestampO: Option[CantonTimestamp] = None) extends HasTraceContext with Product with Serializable
- final case class ReadEventPayloads(events: Seq[Sequenced[IdOrPayload]]) extends ReadEvents with Product with Serializable
- trait ReadEvents extends AnyRef
- final case class ReceiptStoreEvent(sender: SequencerMemberId, messageId: MessageId, topologyTimestampO: Option[CantonTimestamp], traceContext: TraceContext, trafficReceiptO: Option[TrafficReceipt]) extends StoreEvent[Nothing] with Product with Serializable
- final case class RegisteredMember(memberId: SequencerMemberId, registeredFrom: CantonTimestamp, enabled: Boolean) extends Product with Serializable
- final case class SafeWatermark(nextTimestamp: Option[CantonTimestamp]) extends ReadEvents with Product with Serializable
No events found but may return the safe watermark across online sequencers to read from the next time
- sealed trait SaveLowerBoundError extends AnyRef
- sealed trait SavePayloadsError extends AnyRef
- sealed trait SaveWatermarkError extends AnyRef
- final case class Sequenced[+P](timestamp: CantonTimestamp, event: StoreEvent[P]) extends HasTraceContext with Product with Serializable
Wrapper to assign a timestamp to a event.
Wrapper to assign a timestamp to a event. Useful to structure this way as events are only timestamped right before they are persisted (this is effectively the "sequencing" step). Before this point the sequencer component is free to reorder incoming events.
- class SequencerMemberCache extends AnyRef
Read through async cache with no eviction (as members should be immutable).
Read through async cache with no eviction (as members should be immutable). Members will only be cached if entries are found.
- final case class SequencerMemberId(id: Int) extends PrettyPrinting with Product with Serializable
In the sequencer database we use integers to represent members.
In the sequencer database we use integers to represent members. Wrap this in the APIs to not confuse with other numeric types.
- trait SequencerMemberValidator extends AnyRef
An interface for validating members of a sequencer, i.e.
An interface for validating members of a sequencer, i.e. that member is registered at a certain time.
- trait SequencerStore extends SequencerMemberValidator with NamedLogging with AutoCloseable
Persistence for the Sequencer.
Persistence for the Sequencer. Writers are expected to create a SequencerWriterStore which may delegate to this underlying store through an appropriately managed storage instance.
- final case class SequencerSynchronizerConfiguration(synchronizerId: SynchronizerId, synchronizerParameters: StaticSynchronizerParameters) extends Product with Serializable
- trait SequencerSynchronizerConfigurationStore extends AnyRef
- sealed trait SequencerSynchronizerConfigurationStoreError extends AnyRef
- trait SequencerWriterStore extends AutoCloseable
A subset of the sequencer storage methods required by the SequencerWriter with convenience methods to avoid passing the
instanceIndex
everywhere. - sealed trait StoreEvent[+PayloadReference] extends HasTraceContext
Sequencer events in a structure suitable for persisting in our events store.
Sequencer events in a structure suitable for persisting in our events store. The payload type is parameterized to allow specifying either a full payload or just a id referencing a payload.
- class UniqueKeyViolationException extends RuntimeException
Thrown when a record that must be unique is inserted with a non-unique key.
Thrown when a record that must be unique is inserted with a non-unique key. Mirrors the type of exceptions that we would expect to see from a database.
- final case class VersionedStatus extends HasProtocolVersionedWrapper[VersionedStatus] with Product with Serializable
- final case class Watermark(timestamp: CantonTimestamp, online: Boolean) extends Product with Serializable
Time that the sequencer commits to not writing events before, and therefore it is safe to read events less or equal to this timestamp.
Value Members
- object DeliverErrorStoreEvent extends Serializable
- object DeliverStoreEvent extends Serializable
- object EventsBuffer
- object PayloadId extends Serializable
- object Presequenced extends Serializable
- object PruningUtils
- object SaveLowerBoundError
- object SavePayloadsError
- object SaveWatermarkError
- object SequencerMemberId extends Serializable
- object SequencerStore
- object SequencerSynchronizerConfigurationStore
- object SequencerSynchronizerConfigurationStoreError
- object SequencerWriterStore
- object VersionedStatus extends VersioningCompanion2[VersionedStatus, VersionedStatus] with Serializable