Apama 10.7.2 | Developing Apama Applications | Developing Apama Applications in EPL | Using EPL Plug-ins | Using the MemoryStore | Steps for using the MemoryStore
 
Steps for using the MemoryStore
 
Preparing and opening stores
Description of row structures
Preparing and opening tables
Using transactions to manipulate rows
Determining which commit action to call
Creating and removing rows
Iterating over the rows in a table
Requesting persistence
To use the MemoryStore, you must first add the The MemoryStore bundle to your project, unless you are using the distributed MemoryStore. (If you are using the distributed MemoryStore, instead of adding the The MemoryStore bundle, you need to add the Distributed MemoryStore adapter. For more information on this, see Adding distributed MemoryStore support to a project.)
After you have added the MemoryStore bundle, you write EPL that does the following:
1. Prepare and then open a store that will contain one or more tables.
2. Define the data schema for the rows that will belong to the table.
3. Prepare and then open a table in a store.
4. For applications that will access data in a distributed store, if the underlying third-party distributed cache provider supports notifications, optionally subscribe to the table in order to receive notifications when data has changed. For further information, see Notifications.
5. Get a new or existing row from the table.
6. Modify the row.
7. Commit the modified row to the table.
8. Repeat the three previous steps as often as needed.
9. Optionally, use an iterator to step through all rows in the table.
10. Optionally, store the in-memory table on disk.