Storage adapter class that implement access to a storage device. Used by the Storage utilitiy.
Implement simple memory storage adapter.
Implement simple localstorage storage adapter.
Implement simple sessionStorage storage adapter.
Storage adapter class that implement access to a storage device. Used by the Storage utilitiy.
Kind: global class
Boolean
Boolean
Boolean
String
Boolean
Return if this storage adapter is persistent storage or not.
Kind: instance property of StorageAdapter
Returns: Boolean
- True if this storage type is persistent.
Boolean
Check if this adapter is OK to be used. For example, an adapter for localStorage will make sure it exists and not null.
Kind: instance method of StorageAdapter
Returns: Boolean
- True if storage adapter is valid to be used.
Boolean
Check if a key exists.
Kind: instance method of StorageAdapter
Returns: Boolean
- True if key exists in storage.
Param | Type | Description |
---|---|---|
key | String |
Key to check. |
Set value.
Kind: instance method of StorageAdapter
Param | Type | Description |
---|---|---|
key | String |
Key to set. |
value | String |
Value to set. |
String
Get value.
Kind: instance method of StorageAdapter
Returns: String
- Value or null if not set.
Param | Type | Description |
---|---|---|
key | String |
Key to get. |
Delete value.
Kind: instance method of StorageAdapter
Param | Type | Description |
---|---|---|
key | String |
Key to delete. |
Clear all values from this storage device.
Kind: instance method of StorageAdapter
Param | Type | Description |
---|---|---|
prefix | String |
Storage keys prefix. |
Implement simple memory storage adapter.
Kind: global class
Create the memory storage adapter.
Kind: instance property of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Kind: instance method of StorageAdapterMemory
Implement simple localstorage storage adapter.
Kind: global class
Kind: instance property of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Kind: instance method of StorageAdapterLocalStorage
Implement simple sessionStorage storage adapter.
Kind: global class
Kind: instance property of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage
Kind: instance method of StorageAdapterSessionStorage