The memory add-on allows to store and retrieve values to respectively from the memory.
By default, the memory is in scope of the service composite (server process), but it is also possible to store values in a request session context. Basically, the memory adapter is a thread-safe hash list allowing to
To store data to memory, provide the Memory adapter with the following:
Figure: Storing a Data to memory
If an element with the given key already exists in memory, it will be overwritten by the Memory Adapter. In this case, parameter oldValue returns the value that got overwritten.
To retrieve data that has been stored to memory, provide the Memory adapter with the following:
Figure: Retrieving Data from Memory
If no data with the given key can be found, the Memory adapter throws an error.
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. |
To remove data from memory, provide the Memory adapter with the following:
Figure: Removing Data from Memory
Parameter oldValue returns the value that has been removed. If no data with the given key can be found, the Memory adapter throws an error (MEMADSM/12
, see also the list of system errors).
Find a list of all persistent state error codes on System Errors of the Memory Adapter.
Error Code | Description |
---|---|
MEMADSM/12 | The message is not stored here. |
To clear the complete used memory, provide the Memory adapter with the following:
Figure: Clearing the Memory |