Packages

class ContractStore[T, L] extends BaseContractObserver[T] with NamedLogging with NoTracing

A in-memory contract store with trivial indexing and query capabilities

The contract store takes an index function which maps an instance to an index object L (a case class), which allows to query the store using find(arg: L): Seq[Contract[T]].

The store find / all commands will only return contracts for which no command has yet been submitted that will consume the contract.

T

the contract template (scala code-gen)

L

the index expression

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ContractStore
  2. NoTracing
  3. NamedLogging
  4. BaseContractObserver
  5. ContractObserver
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ContractStore(name: String, companion: TemplateCompanion[T], index: (Contract[T]) => L, filter: (Contract[T]) => Boolean, loggerFactory: NamedLoggerFactory)(implicit arg0: Pretty[T])

    name

    a name which we'll be using for logging

    companion

    the template companion of the template we are watching

    index

    the indexing function which takes an instance of a contract and returns some index object (query arguments)

    filter

    filter to limit what is stored in the contract store

    loggerFactory

    the logger factory

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 allAvailable: Iterable[Contract[T]]

    return all contracts which are not pending

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def contractArchived(archive: Contract[T], index: L): Unit
    Attributes
    protected
  8. def contractCreated(create: Contract[T], index: L): Unit
    Attributes
    protected
  9. def entirelyEmpty: Boolean
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def find(item: L): Seq[Contract[T]]

    find all contracts that are not pending and match the query argument

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hasPending: Boolean
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. val loggerFactory: NamedLoggerFactory
    Definition Classes
    ContractStoreNamedLogging
  19. implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def num(item: L): Int

    return number of contracts matching the query argument excluding pending contracts

  25. def one(item: L): Option[Contract[T]]

    return one contract that is not pending and that matches the query argument

  26. def processArchive(archive: ArchivedEvent): Boolean
  27. def processArchive_(archive: ContractId[T]): Unit
    Attributes
    protected
    Definition Classes
    ContractStoreBaseContractObserver
  28. def processCreate(create: CreatedEvent): Boolean
  29. def processCreate_(create: Contract[T]): Unit
    Attributes
    protected
    Definition Classes
    ContractStoreBaseContractObserver
  30. def reset(): Unit
    Definition Classes
    ContractStoreContractObserver
  31. def setPending(cid: ContractId[T], isPending: Boolean): Boolean
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. def totalNum: Int

    return total number of contracts in store, pending and non-pending

  35. implicit def traceContext: TraceContext
    Attributes
    protected
    Definition Classes
    NoTracing
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. 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 NoTracing

Inherited from NamedLogging

Inherited from BaseContractObserver[T]

Inherited from ContractObserver

Inherited from AnyRef

Inherited from Any

Ungrouped