Interface: PersistenceInterface

hyrrokkin_engine.PersistenceInterface

An interface defining a persistence API used to store properties and data for a node or configuration
Construct a instance
Source:

Methods

(async) get_data(key) → {Promise.<(ArrayBuffer|null)>}

Retrieve data associated with a key or null if no data is associated with that key
Parameters:
Name Type Description
key string the key value
Source:
Returns:
Type
Promise.<(ArrayBuffer|null)>

(async) get_data_keys() → {Promise.<Array.<string>>}

Get an array containing the keys of all data items
Source:
Returns:
Type
Promise.<Array.<string>>

(async) get_properties() → {Object}

Get the set of properties associated with this node/configuration
Source:
Returns:
the value of the properties
Type
Object

(async) set_data(key, data) → {Promise.<void>}

Store data associated with a key
Parameters:
Name Type Description
key string the key value
data ArrayBuffer | null the data value (pass null to delete data associated with the key)
Source:
Returns:
Type
Promise.<void>

(async) set_properties(properties)

Set the properties associated with this node
Parameters:
Name Type Description
properties Object the properties to set, must be an Object that is JSON serialisable
Source: