Caplin Trader 5.1.0

Interface: Storage

Storage

Storage is an interface which describe common operations supported by storage implementations.

Methods

addChangeListener(key, changeListener)

Register change listener for given key of stored data.

Parameters:
Name Type Description
key String

Identifier of stored data.

changeListener Object

Function to be invoked when change of value occurs.

delete(key)

Delete value from storage.

Parameters:
Name Type Description
key String

Identifier of stored data to be deleted.

removeChangeListener(key, changeListener)

Unregister change listener for given key of stored data.

Parameters:
Name Type Description
key String

Identifier of stored data.

changeListener Object

Function to be unregistered from listening to change of value.

save(key, data)

Save value to storage.

Parameters:
Name Type Description
key String

Identifier of data to be stored.

data String

Data to store.