CLASS
MemoryStorageDriver
A simple in-memory key-value storage for client apps
Methods
init()
write(meta:data:)
Write a unit of data into storage, uniquely identified by meta
If such unit of data already exists, it is silently overwritten
Parameters
Name | Description |
---|---|
meta | StorageMeta composite identifier |
data | StorageData unit of data to insert |
Returns
void
read(meta:)
Read data stored under the provided meta
This method is typically used in a permanent storage strategy
Parameters
Name | Description |
---|---|
meta | StorageMeta composite identifier |
Returns
StorageData
stored data, or null if not found
take(meta:)
Take the data stored under the provided meta and remove original
This method is typically used in a temporary storage strategy and as a mean to delete stored entry
Parameters
Name | Description |
---|---|
meta | StorageMeta composite identifier |
Returns
StorageData
stored data, or null if not found