MemoryStore enhancements in 10.1
Apama 10.1 includes the following enhancements for the MemoryStore:
The MemoryStore EPL API has several new actions that make use of the new
any type to simplify operations. For example, a schema can be created from an event type using
schemaFromAny(event) and there are actions that support getting and setting the contents of a
Row using an Apama event type with fields matching the fields of the row. There are also new actions to get and set fields and rows making use of the
any type. See
Description of row structures for more information.
The MemoryStore EPL API has a new
Row.toDictionary() action that returns a
dictionary<string,any> containing all fields in the row. This is useful for diagnostic purposes such as logging and testing, as well as for application development.
The distributed MemoryStore driver API now allows drivers to provide access to
extra fields that are present in individual rows but not in the table schema. The existing
Row.getXXX and
Row.setXXX actions in the EPL API can now be used to get and set such extra fields for stores that support this feature, such as TCStore. The new
Row.getKeys() and
Row.toDictionary() actions provide a way to find out what fields are present in a given row, including both fields from the schema and extra fields. See
Description of row structures for more information about using this feature from EPL, and see
Creating a distributed MemoryStore driver for more information about writing a driver that supports it.
The
forceCommit() action is now available for the
com.apama.memorystore.Row event. This new action allows you to commit the local
Row back to the table even if the row in the table has been modified after the
Row event was obtained. See also
Using transactions to manipulate rows.