Use sessions to interact with data, including insert and
update operations.
About this task
The
ObjectMap interface has the typical Map operations such
as put, get, and remove. However, use the more specific operation
names such as: get, getForUpdate, insert, update, and remove. These
method names convey the intent more precisely than the traditional
Map APIs.
![[Java programming language only]](./images/ngjava.gif)
Note: The
upsert and
upsertAll methods replace
the ObjectMap
put and
putAll methods. Use the
upsert method to tell the BackingMap that an entry in the data grid needs
to place the key and value into the grid. The BackingMap does either an insert or an update
to place the value into the grid .
You can also use the
indexing support, which is flexible.