Options
All
  • Public
  • Public/Protected
  • All
Menu

A storage provider that can propogate changes through the cluster. In a distributed system where data is partially stored at the node level, some systems require a mechanism to sychronize writes.

Type parameters

  • TKey

  • TValue

Hierarchy

Index

Properties

Readonly isPersistable

isPersistable: boolean
returns

If this storage layer can be used for permenant storage

Methods

delete

  • delete(key: TKey): Promise<boolean | IAgedValue<TValue>>

get

  • get(key: TKey): Promise<null | IAgedValue<TValue>>

keys

  • keys(): Promise<TKey[]>

set

size

  • size(): Promise<number>

subscribe

  • Whenever a key/value changes, the storage provider can notify observers, so that they can react accordingly. This will add the observer until an unsubscribe() is called

    Parameters

    Returns boolean

    If subscribing to changes was successful

unsubscribe

Generated using TypeDoc