new Storage(name, time, counter){Storage}
Initializes the database and all return values.
Name | Type | Description |
---|---|---|
name |
String | |
time |
Number | |
counter |
Number |
Returns:
Type | Description |
---|---|
Storage |
Methods
-
getAttributeNames(callback)
-
Sets the attributeNames array.
Name Type Description callback
function optional nullable For alternative actions, if an asynchronous function is used.
-
getAttributesOverview(){Array}
-
Returns the names of all stored Attributes (tableNames as string).
Returns:
Type Description Array -
getCountCondition(){Number}
-
Returns the current count condition for flush.
Returns:
Type Description Number -
getCurrentData(){RetrievalResult}
-
Returns the last retrieved Attributes.
Returns:
Type Description RetrievalResult -
getTimeCondition(){Number}
-
Returns the current time condition for flush.
Returns:
Type Description Number -
retrieveAttributes(tableName, callback)
-
Retrieves a table and sets the RetrievalResult.
Name Type Description tableName
String Name for the table that should be retrieved.
callback
function nullable For additional actions, if an asynchronous function is used.
-
setCountCondition(_counter)
-
Sets the counter for flush.
Name Type Description _counter
Number counter
-
setTimeCondition(time)
-
Sets the time condition for flush.
Name Type Description time
Number time in ms
-
store(attributeValue)
-
Stores the given Attribute. If the flush condition does not match, the data is first added to the local cache before.
Name Type Description attributeValue
Attribute Value that should be stored.