trait DbBulkUpdateProcessor[A, B] extends Processor[A, Try[B]]
Implementation of aggregated bulk update operations for DB stores
- Alphabetic
- By Inheritance
- DbBulkUpdateProcessor
- Processor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type CheckData
Type of data returned when checking what information the store contains for a given item.
Type of data returned when checking what information the store contains for a given item.
- Attributes
- protected
- abstract type ItemIdentifier
The type of identifier that is used to correlate items and the information retrieved from the store when checking.
The type of identifier that is used to correlate items and the information retrieved from the store when checking.
- Attributes
- protected
- case class NoResponseForAggregatedItemException(item: A) extends RuntimeException with Product with Serializable
- Definition Classes
- Processor
Abstract Value Members
- abstract def analyzeFoundData(item: A, foundData: Option[CheckData])(implicit traceContext: TraceContext): Try[B]
Compare the item against the data that was found in the store and produce a result.
Compare the item against the data that was found in the store and produce a result. It is called for each item that the update command returned an update counter not equal to 1.
- Attributes
- protected
- abstract def bulkUpdateAction(items: NonEmpty[Seq[Traced[A]]])(implicit batchTraceContext: TraceContext): DBIOAction[Array[Int], NoStream, All]
Idempotent bulk DB operation for the given items.
Idempotent bulk DB operation for the given items.
- Attributes
- protected
- abstract def checkQuery(itemsToCheck: NonEmpty[Seq[ItemIdentifier]])(implicit batchTraceContext: TraceContext): Iterable[ReadOnly[Iterable[CheckData]]]
A list of queries for the items that we want to check for
A list of queries for the items that we want to check for
- Attributes
- protected
- abstract def dataIdentifier(state: CheckData): ItemIdentifier
Identifier selector for stored data
Identifier selector for stored data
- Attributes
- protected
- abstract def executeBatch(items: NonEmpty[Seq[Traced[A]]])(implicit traceContext: TraceContext): Future[Iterable[Try[B]]]
Computation for a batch of items.
Computation for a batch of items.
- returns
The responses for the items in the correct order. Must have the same length
- Definition Classes
- Processor
- implicit abstract def executionContext: ExecutionContext
- Attributes
- protected
- abstract def itemIdentifier(item: A): ItemIdentifier
Identifier selector for items
Identifier selector for items
- Attributes
- protected
- abstract def kind: String
Human-readable description of the kind of items that can be batched
Human-readable description of the kind of items that can be batched
- Definition Classes
- Processor
- abstract def logger: TracedLogger
Logger to be used by the com.digitalasset.canton.util.BatchAggregator
Logger to be used by the com.digitalasset.canton.util.BatchAggregator
- Definition Classes
- Processor
- abstract def onSuccessItemUpdate(item: Traced[A]): Try[B]
What to return for an item when the bulk operation returns an update count of 1
What to return for an item when the bulk operation returns an update count of 1
- Attributes
- protected
- abstract def prettyItem: Pretty[A]
Pretty printer for items
Pretty printer for items
- Definition Classes
- Processor
- abstract def storage: DbStorage
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bulkUpdateWithCheck(items: Seq[Traced[A]], queryBaseName: String)(implicit traceContext: TraceContext, closeContext: CloseContext): Future[Iterable[Try[B]]]
- Attributes
- protected
- def bulkUpdateWithCheck(items: NonEmpty[Seq[Traced[A]]], queryBaseName: String)(implicit traceContext: TraceContext, closeContext: CloseContext): Future[Iterable[Try[B]]]
Run the bulkUpdateAction for the given
items
and then check the reported update row counts.Run the bulkUpdateAction for the given
items
and then check the reported update row counts. For items where the update row count is not 1, look what is in the store and produce a corresponding response by comparing the item with the found data.- returns
An scala.collection.Iterable of the same size as
items
that contains the response foritems(i)
is at indexi
.
- Attributes
- protected
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def executeSingle(item: A)(implicit ec: ExecutionContext, traceContext: TraceContext): Future[Try[B]]
Computation for a single item.
Computation for a single item. Should be equivalent to
executeBatch(Seq(Traced(item))).map(_.head)
- Definition Classes
- Processor
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])