Packages

trait KeyValueStore extends AnyRef

Persistent key-value store

The keys are organized into namespaces. THe same key can be used in different namespaces to represent different values. Each entry is also associated with numeric timestamp, and the store is designed to be able to find the latest timestamp within given constraints.

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

Abstract Value Members

  1. abstract def delete(namespace: String, key: Chunk[Byte], marker: Option[Timestamp]): IO[Throwable, Unit]

    Deletes all versions of a given key from a given namespace

    Deletes all versions of a given key from a given namespace

    namespace

    Namespace of the key

    key

    Key of the entries to be deleted

    marker

    If None, all values with the given key are going to be deleted. If it is set to a timestamp, only the old values are going to be deleted, such that getLatest called with the marker timestamp can still return a valid element if there was any before calling delete.

  2. abstract def getAllTimestamps(namespace: String, key: Chunk[Byte]): ZStream[Any, Throwable, Timestamp]

    Gets all the stored timestamps for a given key

  3. abstract def getLatest(namespace: String, key: Chunk[Byte], before: Option[Timestamp]): IO[Throwable, Option[Chunk[Byte]]]

    Get the stored value of a given key with the largest timestamp

    Get the stored value of a given key with the largest timestamp

    namespace

    Namespace of the keys

    key

    Key of the item

    before

    If specified, the returned item will be the one with the largest timestamp but not larger than the provided value. Otherwise it takes the entry with the largest timestamp.

    returns

    The stored value if it was found, or None

  4. abstract def getLatestTimestamp(namespace: String, key: Chunk[Byte]): IO[Throwable, Option[Timestamp]]

    Get the largest timestamp a given key has value stored with.

    Get the largest timestamp a given key has value stored with. This is the timestamp of the element that would be returned by getLatest if its timestamp is not constrained.

    namespace

    Namespace of the keys

    key

    Key of the item

    returns

    Largest timestamp stored in the key-value store, or None if there isn't any

  5. abstract def put(namespace: String, key: Chunk[Byte], value: Chunk[Byte], timestamp: Timestamp): IO[Throwable, Boolean]

    Put an item to the store

    Put an item to the store

    namespace

    Namespace of the keys

    key

    Key of the item

    value

    Value of the item

    timestamp

    Timestamp of the item. If a value with the same key and timestamp already exists it is going to be overridden.

    returns

    True if the item was stored

  6. abstract def scanAll(namespace: String): ZStream[Any, Throwable, (Chunk[Byte], Chunk[Byte])]

    Get all key-value pairs of the given namespace, using the latest timestamp for each

    Get all key-value pairs of the given namespace, using the latest timestamp for each

    namespace

    Namespace of the keys

    returns

    A stream of key-value pairs

  7. abstract def scanAllKeys(namespace: String): ZStream[Any, Throwable, Chunk[Byte]]

    Get all the keys of the given namespace

    Get all the keys of the given namespace

    namespace

    Namespace of the keys

    returns

    A stream of keys

Concrete 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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped