com.opendatagroup.hadrian.shared

SharedMapInMemory

class SharedMapInMemory extends SharedMap

Concrete subclass of SharedMap that implements sharing within one JVM using a java.util.concurrent.ConcurrentHashMap.

Follows the SharedMap concurrency rules (see SharedMap documentation for details).

Linear Supertypes
SharedMap, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SharedMapInMemory
  2. SharedMap
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SharedMapInMemory(initialCapacity: Int = 16, loadFactor: Float = 0.75, concurrencyLevel: Int = 16)

    initialCapacity

    passed to ConcurrentHashMap

    loadFactor

    passed to ConcurrentHashMap

    concurrencyLevel

    passed to ConcurrentHashMap

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def blockUntilInitialized(): Unit

    Methods like get, put, etc.

    Methods like get, put, etc. should wait for initialize to finish. Concrete implementations should call blockUntilInitialized first to ensure that the SharedMap is past the initialization stage.

    Definition Classes
    SharedMap
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def get(name: String, path: Array[PathIndex]): Either[Exception, Any]

    Returns the item with a given name at substructure path if it exists or an exception if there are any errors.

    Returns the item with a given name at substructure path if it exists or an exception if there are any errors.

    Blocks during initialization, but never afterward. If a put, update, or remove is in progress, get returns the old version of the item; it does not wait for a new version to be provided.

    name

    name of the object to extract (could be a cell or an item of a pool)

    path

    sequence of array indexes, map keys, and record field names to extract

    returns

    a tagged union (Scala Either) of Left(exception object) or Right(result at the end of the path)

    Definition Classes
    SharedMapInMemorySharedMap
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. def initialize(names: Set[String], value: (String) ⇒ Any): Unit

    The first time a SharedMap is built, it may need to set up many names at once and ensure that all of these names are installed before any further access.

    The first time a SharedMap is built, it may need to set up many names at once and ensure that all of these names are installed before any further access. This function provides a way to do that.

    initialize only takes effect the first time it is called. After that, it is strictly pass-through.

    Definition Classes
    SharedMap
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def put[X](name: String, path: Array[PathIndex], value: X, initializing: Boolean = false): Either[Exception, X]

    Replaces or adds an item with a given name at substructure path, returning value if there are no errors or an exception otherwise.

    Replaces or adds an item with a given name at substructure path, returning value if there are no errors or an exception otherwise.

    Blocks during initialization and during any other update (put, update, or remove). Blocking is at the granularity of a particular item: if another item (with another name) is being updated, this function does not wait.

    put is a special case of update in which initialValue is value and updator is a function that ignores the input and returns value.

    name

    name of the object to replace (could be a cell or an item of a pool)

    path

    sequence of array indexes, map keys, and record field names to dig down to before replacing

    returns

    a tagged union (Scala Either) of Left(exception object) or Right(new value at the end of the path)

    Definition Classes
    SharedMapInMemorySharedMap
  21. def remove(name: String): AnyRef

    Removes an item with a given name.

    Removes an item with a given name.

    Blocks during initialization and during any other update (put, update, or remove). Blocking is at the granularity of a particular item: if another item (with another name) is being updated, this function does not wait.

    name

    name of the object to replace (could be a cell or an item of a pool)

    returns

    old value

    Definition Classes
    SharedMapInMemorySharedMap
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toMap: Map[String, Any]

    Block updates and return a snapshot of the SharedMap at a point in time.

    Block updates and return a snapshot of the SharedMap at a point in time.

    Definition Classes
    SharedMapInMemorySharedMap
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. def update[X](name: String, path: Array[PathIndex], initialValue: X, updator: (X) ⇒ X, schema: Schema): Either[Exception, Any]

    Replaces or adds an item with a given name at substructure path with an updator function (if it exists) or an initialValue (if it does not), returning the new value if there are no errors or an exception otherwise.

    Replaces or adds an item with a given name at substructure path with an updator function (if it exists) or an initialValue (if it does not), returning the new value if there are no errors or an exception otherwise.

    Blocks during initialization and during any other update (put, update, or remove). Blocking is at the granularity of a particular item: if another item (with another name) is being updated, this function does not wait.

    name

    name of the object to replace (could be a cell or an item of a pool)

    path

    sequence of array indexes, map keys, and record field names to dig down to before replacing

    initialValue

    value to use it the object does not yet exist

    updator

    function to apply to an existing object to get a new value

    returns

    a tagged union (Scala Either) of Left(exception object) or Right(new value at the end of the path)

    Definition Classes
    SharedMapInMemorySharedMap
  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SharedMap

Inherited from AnyRef

Inherited from Any

Ungrouped