org.sigilaris.core.application.scheduling

Members list

Type members

Classlikes

final case class AggregateFootprint(readsSeen: Set[StateRef], writesSeen: Set[StateRef])

Accumulated reads and writes seen so far during batch conflict checking.

Accumulated reads and writes seen so far during batch conflict checking.

Value parameters

readsSeen

all state references read by previously accepted items

writesSeen

all state references written by previously accepted items

Attributes

Companion
object
Source
Verification.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Companion for AggregateFootprint.

Companion for AggregateFootprint.

Attributes

Companion
class
Source
Verification.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
enum BatchPlan[A]

The result of batch planning: either a schedulable or compatibility plan.

The result of batch planning: either a schedulable or compatibility plan.

Type parameters

A

the item type

Attributes

Source
BatchPlanning.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BatchPlanner

Classifies and plans batches of items for execution based on conflict footprints.

Classifies and plans batches of items for execution based on conflict footprints.

Attributes

Source
BatchPlanning.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class ClassifiedItem[A](item: A, classification: SchedulingClassification)

A batch item paired with its scheduling classification.

A batch item paired with its scheduling classification.

Type parameters

A

the item type

Value parameters

classification

the scheduling classification

item

the original item

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class CompatibilityBatchPlan[A](items: Vector[ClassifiedItem[A]], mode: CompatibilityMode)

Batch execution plan for compatibility mode (sequential execution).

Batch execution plan for compatibility mode (sequential execution).

Type parameters

A

the item type

Value parameters

items

the classified items in execution order

mode

the compatibility mode (mixed or compatibility-only)

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Mode of compatibility execution for a batch.

Mode of compatibility execution for a batch.

Attributes

Source
BatchPlanning.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class CompatibilityReason(reason: String, detail: Option[String])

Describes why a transaction or batch fell back to compatibility mode.

Describes why a transaction or batch fell back to compatibility mode.

Value parameters

detail

optional human-readable detail

reason

short machine-readable reason code

Attributes

Companion
object
Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Companion for CompatibilityReason.

Companion for CompatibilityReason.

Attributes

Companion
class
Source
BatchPlanning.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ConflictFootprint(reads: Set[StateRef], writes: Set[StateRef])

Describes the set of state references a transaction reads from and writes to.

Describes the set of state references a transaction reads from and writes to.

Used by the batch scheduler to detect read-write and write-write conflicts between transactions within a batch.

Value parameters

reads

the state references read by the transaction

writes

the state references written by the transaction

Attributes

Companion
object
Source
ConflictFootprint.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Companion for ConflictFootprint, providing construction from access logs.

Companion for ConflictFootprint, providing construction from access logs.

Attributes

Companion
class
Source
ConflictFootprint.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Validates that an actual footprint conforms to (is a subset of) a declared footprint.

Validates that an actual footprint conforms to (is a subset of) a declared footprint.

Attributes

Source
Verification.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Verifies that a collection of footprints are mutually conflict-free.

Verifies that a collection of footprints are mutually conflict-free.

Attributes

Source
Verification.scala
Supertypes
class Object
trait Matchable
class Any
Self type

The kind of state conflict detected between two footprints.

The kind of state conflict detected between two footprints.

Attributes

Source
Verification.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ExecutedSchedulableItem[A](planned: SchedulableItem[A], execution: TxExecution[_, _])

A schedulable item that has been executed, pairing the plan with the execution result.

A schedulable item that has been executed, pairing the plan with the execution result.

Type parameters

A

the item type

Value parameters

execution

the execution result

planned

the original planned schedulable item

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Conformance check failure for a single executed item.

Conformance check failure for a single executed item.

Type parameters

A

the item type

Attributes

Source
BatchPlanning.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FootprintConflict[A](item: A, stateRef: StateRef, kind: ConflictKind)

Describes a detected conflict between a new item's footprint and the aggregate.

Describes a detected conflict between a new item's footprint and the aggregate.

Type parameters

A

the item type

Value parameters

item

the later-processed item that failed admission

kind

the kind of conflict (write-write or read-write)

stateRef

the state reference where the conflict occurred

Attributes

Source
Verification.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FootprintConformanceFailure(unexpectedReads: Set[StateRef], unexpectedWrites: Set[StateRef])

Failure indicating the actual footprint exceeded the declared footprint.

Failure indicating the actual footprint exceeded the declared footprint.

Value parameters

unexpectedReads

state references read that were not declared

unexpectedWrites

state references written that were not declared

Attributes

Source
Verification.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FootprintDerivationFailure(reason: String, detail: Option[String]) extends StructuredFailureDiagnostic

Lightweight derivation failure surface for the initial rollout.

Lightweight derivation failure surface for the initial rollout.

Later phases can widen detail if structured diagnostics become necessary.

Attributes

Companion
object
Source
FootprintDeriver.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
FootprintDeriver.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait FootprintDeriver[-A]

Typeclass for deriving a conflict footprint from a value.

Typeclass for deriving a conflict footprint from a value.

Implementations map domain-specific transaction types to their read/write state references for scheduling conflict detection.

Type parameters

A

the input type (contravariant)

Attributes

Companion
object
Source
FootprintDeriver.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Companion for FootprintDeriver, providing summoning and factory methods.

Companion for FootprintDeriver, providing summoning and factory methods.

Attributes

Companion
trait
Source
FootprintDeriver.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class SchedulableBatchExecution[A](nextState: StoreState, items: Vector[ExecutedSchedulableItem[A]])

Result of executing a schedulable batch plan.

Result of executing a schedulable batch plan.

Type parameters

A

the item type

Value parameters

items

the executed items in order

nextState

the store state after all transactions have been applied

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Executes a schedulable batch plan sequentially, verifying footprint conformance after each item.

Executes a schedulable batch plan sequentially, verifying footprint conformance after each item.

Attributes

Source
BatchPlanning.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class SchedulableBatchPlan[A](items: Vector[SchedulableItem[A]], aggregate: AggregateFootprint)

Batch execution plan for schedulable mode (conflict-free transactions).

Batch execution plan for schedulable mode (conflict-free transactions).

Type parameters

A

the item type

Value parameters

aggregate

the aggregate footprint of all items (verified conflict-free)

items

the schedulable items with their declared footprints

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Failure that may occur during schedulable batch execution.

Failure that may occur during schedulable batch execution.

Type parameters

A

the item type

E

the execution error type

Attributes

Source
BatchPlanning.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Validates that an executed transaction's actual footprint conforms to its declared footprint.

Validates that an executed transaction's actual footprint conforms to its declared footprint.

Attributes

Source
BatchPlanning.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class SchedulableItem[A](item: A, declaredFootprint: ConflictFootprint)

A batch item with a declared conflict footprint, eligible for schedulable execution.

A batch item with a declared conflict footprint, eligible for schedulable execution.

Type parameters

A

the item type

Value parameters

declaredFootprint

the declared read/write footprint

item

the original item

Attributes

Source
BatchPlanning.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Classification of a transaction for batch scheduling purposes.

Classification of a transaction for batch scheduling purposes.

Attributes

Companion
object
Source
BatchPlanning.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Companion for SchedulingClassification, providing derivation helpers.

Companion for SchedulingClassification, providing derivation helpers.

Attributes

Companion
enum
Source
BatchPlanning.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object StateRef

Companion for StateRef, providing construction and extensions.

Companion for StateRef, providing construction and extensions.

Attributes

Source
StateRef.scala
Supertypes
class Object
trait Matchable
class Any
Self type
StateRef.type

Types

opaque type StateRef

Opaque reference to a specific piece of state (table prefix + encoded key).

Opaque reference to a specific piece of state (table prefix + encoded key).

Used as the unit of conflict detection in the scheduling system. Two transactions conflict if they share a StateRef in their read/write sets according to the conflict rules.

Attributes

Source
StateRef.scala