new UWA.Storage.Adapter.Abstract(storage, options)
Data Storage API Abstract Adapter.
Parameters
Name | Type | Description |
---|---|---|
storage |
Object | UWA.Storage instance used by adapter |
options |
Object | Options hash or a option/value pair. |
Mixes In
- UWA.Class.Options
Index
Members
-
type :String
-
The type of storage engine used by Adapter.
Type
- String
-
limit :Number
-
The maximum limit of the storage engine.
Type
- Number
Methods
-
isAvailable() → {Boolean}
-
This should be overloaded with an actual functionality presence check
Returns
- Type
- Boolean
-
get(key) → {*}
-
Provide a simple interface for reading key value.
Parameters
Name Type Description key
String The key name
Returns
Key Value or
null
.- Type
- *
-
set(key, value) → {String}
-
Provide a simple interface for storing key value.
Parameters
Name Type Description key
String The key name
value
String The serialized key value
Returns
Key value.
- Type
- String
-
rem(key) → {String}
-
Provide a simple interface for removing values.
Parameters
Name Type Description key
String The key name
Returns
Previous key value.
- Type
- String