Version: 1.0.0
A PersistentStore plugin for Thunder framework.
The PersistentStore plugin provides an interface for PersistentStore.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
| Name | Type | Description |
|---|---|---|
| callsign | string | Plugin instance name (default: org.rdk.PersistentStore) |
| classname | string | Class name: PersistentStore |
| locator | string | Library name: libWPEFrameworkPersistentStore.so |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
The following methods are provided by the PersistentStore plugin:
PersistentStore interface methods:
| Method | Description |
|---|---|
| deleteKey | |
| deleteNamespace | |
| getValue | |
| setValue |
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.scope | string | |
| params.namespace | string | |
| params.key | string |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.PersistentStore.deleteKey",
"params": {
"scope": "DEVICE",
"namespace": "",
"key": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.PersistentStore.deleteKey", "params": {"scope": "DEVICE", "namespace": "", "key": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 0,
"result": null
}Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.scope | string | |
| params.namespace | string |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.PersistentStore.deleteNamespace",
"params": {
"scope": "DEVICE",
"namespace": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.PersistentStore.deleteNamespace", "params": {"scope": "DEVICE", "namespace": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 1,
"result": null
}Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.scope | string | |
| params.namespace | string | |
| params.key | string |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.value | string | |
| result.ttl | integer |
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.PersistentStore.getValue",
"params": {
"scope": "DEVICE",
"namespace": "",
"key": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.PersistentStore.getValue", "params": {"scope": "DEVICE", "namespace": "", "key": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 2,
"result": {
"value": "",
"ttl": 0
}
}Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.scope | string | |
| params.namespace | string | |
| params.key | string | |
| params.value | string | |
| params.ttl | integer |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.PersistentStore.setValue",
"params": {
"scope": "DEVICE",
"namespace": "",
"key": "",
"value": "",
"ttl": 0
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.PersistentStore.setValue", "params": {"scope": "DEVICE", "namespace": "", "key": "", "value": "", "ttl": 0}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 3,
"result": null
}Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the PersistentStore plugin:
PersistentStore interface events:
| Event | Description |
|---|---|
| onValueChanged |
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.scope | string | |
| params.namespace | string | |
| params.key | string | |
| params.value | string |
{
"jsonrpc": 2.0,
"id": 4,
"method": "org.rdk.PersistentStore.valueChanged",
"params": {
"scope": "DEVICE",
"namespace": "",
"key": "",
"value": ""
}
}