Until now, we have been dealing primarily with putting, getting, and updating objects in a BackingMap. We can also remove objects in a BackingMap with the ObjectMap
remove(Object key) and
removeAll(Collection keys) methods. Removing an object with the
remove(Object key) method behaves like a remove method on a
java.util.Map in that the object removed from the map is returned from the method. This method obeys the copy mode specified on the BackingMap. The
removeAll(Collection keys) method uses the void return value, and does not return the list of objects removed from a BackingMap.
Removing objects from a BackingMap can also be done by setting a time-to-live on each object. The time-to-live value tells the BackingMap to remove ...