class InMemoryStore extends KVStore
Implementation of KVStore that keeps data deserialized in memory. This store does not index data; instead, whenever iterating over an indexed field, the stored data is copied and sorted according to the index. This saves memory but makes iteration more expensive.
- Annotations
- @Private()
- Alphabetic
- By Inheritance
- InMemoryStore
- KVStore
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new InMemoryStore()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(): Unit
- Definition Classes
- InMemoryStore → Closeable → AutoCloseable
- Annotations
- @Override()
- def count(type: Class[_ <: AnyRef], index: String, indexedValue: AnyRef): Long
Returns the number of items of the given type which match the given indexed value.
Returns the number of items of the given type which match the given indexed value.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- def count(type: Class[_ <: AnyRef]): Long
Returns the number of items of the given type currently in the store.
Returns the number of items of the given type currently in the store.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- def delete(type: Class[_ <: AnyRef], naturalKey: AnyRef): Unit
Removes an object and all data related to it, like index entries, from the store.
Removes an object and all data related to it, like index entries, from the store.
- type
The object's type.
- naturalKey
The object's "natural key", which uniquely identifies it. Null keys are not allowed.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- Exceptions thrown
java.util.NoSuchElementExceptionIf an element with the given key does not exist.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getMetadata[T](klass: Class[T]): T
Returns app-specific metadata from the store, or null if it's not currently set.
Returns app-specific metadata from the store, or null if it's not currently set.
The metadata type is application-specific. This is a convenience method so that applications don't need to define their own keys for this information.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def read[T](klass: Class[T], naturalKey: AnyRef): T
Read a specific instance of an object.
Read a specific instance of an object.
- naturalKey
The object's "natural key", which uniquely identifies it. Null keys are not allowed.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- Exceptions thrown
java.util.NoSuchElementExceptionIf an element with the given key does not exist.
- def removeAllByIndexValues[T](klass: Class[T], index: String, indexValues: Collection[_ <: AnyRef]): Boolean
A cheaper way to remove multiple items from the KVStore
A cheaper way to remove multiple items from the KVStore
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- def setMetadata(value: AnyRef): Unit
Writes the given value in the store metadata key.
Writes the given value in the store metadata key.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def view[T](type: Class[T]): KVStoreView[T]
Returns a configurable view for iterating over entities of the given type.
Returns a configurable view for iterating over entities of the given type.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def write(value: AnyRef): Unit
Writes the given object to the store, including indexed fields.
Writes the given object to the store, including indexed fields. Indices are updated based on the annotated fields of the object's class.
Writes may be slower when the object already exists in the store, since it will involve updating existing indices.
- value
The object to write.
- Definition Classes
- InMemoryStore → KVStore
- Annotations
- @Override()