You can use the Memory adapter to store data to and retrieve data from memory.
Storing Data to Memory
Using the store operation from the Memory adapter, you can store data. Provide the following parameters:
Name | Type | Direction | Description |
---|
key | String | in | Set a key that can be used to access the stored value with the retrieve operation. |
value | Any | in | Provide the data that should be stored to the memory. |
If an element with the given key already exists in memory, it will be overwritten by the Memory Adapter. In this case, no error is thrown, parameter oldValue returns the value that got overwritten.
Name | Type | Direction | Description |
---|
oldValue | Any | out | If the provided key is already present in the memory, it gets overwritten. In this case, oldValue returns the previous value. If no old value is present, oldValue is NULL. |
Retrieving Data From Memory
Using the retrieve operation from the Memory adapter, you can store data. Provide the following parameters:
Name | Type | Direction | Description |
---|
key | String | in | Provide the key of the value that has been stored to memory with store. If no value with this key can be found, the Memory adapter throws error MEMADSM/9 . |
If no data with the given key can be found, the Memory adapter throws an error. In all other cases, value contains the data.
Name | Type | Direction | Description |
---|
value | Any | out | Returns the stored value. |
Find a list of all persistent state error codes on System Errors of the Memory Adapter.
Error Code | Description |
---|
MEMADSM/9 | The message is not stored here. |