Store Class Reference
[Globals]
Description
The Store interface provides a common shared data store available to all v8 commands run in the same RealityServer process. As javascript global variables are local to the V8 isolate, they may not be available from one executing command to another. The Store interface allows data to be shared across isolates in a thread-safe manner.
Static Functions
- delete( String store_name, String key)
- Deletes the value stored under key from the store store_name. More...
- varying get( String store_name, String key)
- Returns the value stored in store_name under key or undefined if not found. More...
- Array keys( String store_name)
- Returns an array containing all keys in store_name or undefined if the store does not exist. More...
- Array names()
- Returns an array containing the names of all known stores. More...
- set( String store_name, String key, varying value)
- Sets key in store_name to value. More...
Functions
- Store.delete( String store_name, String key) [static]
-
Deletes the value stored under key from the store store_name. Deleting the last item in a store will delete the store as well. If key is not provided, then the entire store will be deleted.
Parameters
- store_name
- the name of the store to use.
- key
- the key used to remove the item from the store. Optional.
- varying Store.get( String store_name, String key) [static]
-
Returns the value stored in store_name under key or undefined if not found.
Parameters
- store_name
- the name of the store to use.
- key
- the key used to retrieve the value from the store.
Returns
the value stored in store store_name under key key .
- Array Store.keys( String store_name) [static]
-
Returns an array containing all keys in store_name or undefined if the store does not exist.
Parameters
- store_name
- the name of the store to query.
Returns
a string array containing all keys in store_name .
- Array Store.names() [static]
-
Returns an array containing the names of all known stores.
Returns
a string array containing the names of all known stores.
- Store.set( String store_name, String key, varying value) [static]
-
Sets key in store_name to value. If key or store_name are unknown they will be added to the store.
Parameters
- store_name
- the name of the store to use.
- key
- the key used to store the value in the store.
- value
- the value to be stored.