Reset Last Operation Time¶
Description¶
The Hive system maintains a timer for every key that measures the number of seconds elapsed since the last operation. This operation resets the timer to zero seconds.
Method¶
Backendless.Hive(hiveName).StoreType().touch(keys);
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
StoreType |
This placeholder must be substituted with one of the following stores types: KeyValueStore , ListStore , MapStore , SetStore , SortedSetStore . |
keys |
An array of key names for which to reset last operation time. Must be an array of string values. |
Return Value¶
The number of reset timers.
Example¶
The example below resets time since the last operation of the "fruits"
and "vegetables"
keys to 0
.
List<String> keys = new ArrayList<>();
keys.add("fruits");
keys.add("vegetables");
Backendless.Hive(hiveName).ListStore().touch(keys);
where:
Argument | Description |
---|---|
"groceryStore" |
Name of a hive where the operation is performed. |
"fruits","vegetables"["fruits","vegetables"] |
The array of keys in the store to reset time since the last operation. |
Codeless Reference
¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
type |
Storage type, can be one of the following: Key / Value, Sorted Set, Set, Map, List. |
keys |
A list of key names to reset last operation time for. |
Consider the following Key Value storage:
The example below resets time since the last operation for the specified keys: