class LockableStates[Key, Status <: PrettyPrinting with HasPrunable, E] extends NamedLogging

Manages in-memory states of items (contracts, keys, ...) that are used or modified by in-flight requests. Such in-memory states take precedence over the states in the underlying store, which is only updated when a request is finalized.

Key

Identifier for states

Status

The status type for states.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LockableStates
  2. NamedLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def checkAndLock(handle: LockableStatesCheckHandle[Key, Status])(implicit traceContext: TraceContext): (Seq[Key], ActivenessCheckResult[Key, Status])

    Performs the activeness check consisting of the following:

    Performs the activeness check consisting of the following:

    Must not be called concurrently with other methods of this class unless stated otherwise.

    returns

    The activeness result of the activeness check

    Exceptions thrown

    IllegalConflictDetectionStateException if the handle has outstanding pre-fetches.

  6. implicit val classTagKey: ClassTag[Key]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def getApproximateState(id: Key)(implicit traceContext: TraceContext): OptionT[Future, StateChange[Status]]

    Returns the state of id, fetching it from the store if it is not in memory.

    Returns the state of id, fetching it from the store if it is not in memory. May be called concurrently with any other method. In that case, the returned state may be outdated.

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def invariant[A, B, C](pendingActivenessChecks: Map[RequestCounter, A], locked: Map[RequestCounter, B], pendingEvictions: Map[RequestCounter, C])(selectorActiveness: (A) => Set[Key], selectorLocked: (B) => Seq[Key], selectorPending: (C) => Seq[Key])(implicit traceContext: TraceContext): Unit

    Checks the class invariant.

    Checks the class invariant.

    Must not be called concurrently with other methods of this class unless stated otherwise.

    Exceptions thrown

    IllegalConflictDetectionStateException if the invariant does not hold.

  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. implicit val lockableStatus: LockableStatus[Status]
  16. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  17. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    LockableStatesNamedLogging
  18. implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. def pendingActivenessCheck(rc: RequestCounter, check: ActivenessCheck[Key])(implicit traceContext: TraceContext): LockableStatesCheckHandle[Key, Status]

    Registers the activeness check as pending for the given request.

    Registers the activeness check as pending for the given request.

    Must not be called concurrently with other methods of this class unless stated otherwise.

  24. def prefetchStates(toBeFetched: Iterable[Key])(implicit traceContext: TraceContext): Future[Map[Key, StateChange[Status]]]

    Fetches the given states from the store and returns them.

    Fetches the given states from the store and returns them. Nonexistent items are excluded from the returned map.

    May be called concurrently with other methods of this class.

  25. implicit val prettyKey: Pretty[Key]
  26. def providePrefetchedStates(handle: LockableStatesCheckHandle[Key, Status], fetched: Map[Key, StateChange[Status]])(implicit traceContext: TraceContext): Unit

    Adds the fetched states to the in-memory states that are cached in the handle.

    Adds the fetched states to the in-memory states that are cached in the handle. Items in handle's LockableStates.LockableStatesCheckHandle.toBeFetched are considered treated as nonexistent if fetched does not contain them.

    Must not be called concurrently with other methods of this class unless stated otherwise.

  27. def releaseLock(rc: RequestCounter, id: Key)(implicit traceContext: TraceContext): Unit

    Must not be called concurrently with other methods of this class unless stated otherwise.

  28. def setStatusPendingWrite(id: Key, newState: Status, toc: TimeOfChange): Unit

    Must not be called concurrently with other methods of this class unless stated otherwise.

  29. def signalWriteAndTryEvict(rc: RequestCounter, id: Key)(implicit traceContext: TraceContext): Unit

    Evict the state if it is no longer needed in the map.

    Evict the state if it is no longer needed in the map.

    Must not be called concurrently with other methods of this class unless stated otherwise.

  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. 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

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped