Class

mimir.models

ModelManager

Related Doc: package models

Permalink

class ModelManager extends LazyLogging

The ModelManager handles model persistence.

The main function of the ModelManager is to provide a persistent (Name -> Model) mapping. Associations are created through persist, removed with drop, and accessed with get. The name of the model is given by Model's name field

The secondary function is garbage collection. The manager also tracks a second set of 'owner' entities. Owners can be used to cascade deletes on the owner entity to the models, and allows for reference counting with multiple owners.

See below in this file for some traits used to decode things.

Linear Supertypes
LazyLogging, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ModelManager
  2. LazyLogging
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ModelManager(db: Database)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def associate(model: String, owner: String): Unit

    Permalink

    Assign a model to an owner entity

  6. def associatedModels(owner: String): Seq[String]

    Permalink

    A list of all models presently associated with a given owner.

  7. val cache: Map[String, Model]

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val decoders: Map[String, (Database, Array[Byte]) ⇒ Model]

    Permalink
  10. def disassociate(model: String, owner: String): Unit

    Permalink

    Disassociate a model from an owner entity and cascade the delete to the model if this is the last owner

  11. def drop(name: String): Unit

    Permalink

    Remove an existing Name -> Model association if it exists

  12. def dropOwner(owner: String): Unit

    Permalink

    Drop an owner cascade the delete to any models owned by the owner entity

  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def get(name: String): Model

    Permalink

    Retrieve a model by its name

  17. def getAllModels(): Seq[Model]

    Permalink
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getOption(name: String): Option[Model]

    Permalink

    Retreive a model by its name when it may not be present

  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def init(): Unit

    Permalink

    Prepare the backend database for use with the ModelManager

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging → Logging
  24. def modelOwner(model: String): Option[String]

    Permalink

    A get owner presently associated with a given model.

  25. val modelTable: String

    Permalink
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. val ownerTable: String

    Permalink
  30. def persist(model: Model, owner: String): Unit

    Permalink

    Declare (and cache) a new Name -> Model association, and assign the model to an owner entity.

  31. def persist(model: Model): Unit

    Permalink

    Declare (and cache) a new Name -> Model association

  32. def prefetch(model: String): Unit

    Permalink

    Prefetch a given model

  33. def prefetchForOwner(owner: String): Unit

    Permalink

    Prefetch models for a given owner

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LazyLogging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped