Clear all entries in the map
Close and release the map
Returns true
if this map contains a mapping for the specified
key.
Returns @{code true} if this map maps one or more keys to the specified value.
Get a value from the map
Returns the value to which the specified key is mapped, or
defaultValue
if this map contains no mapping for the key.
Put an entry in the map
Put the entry only if there is no existing entry for that key
Remove an entry from the map
Remove the entry only if there is an entry with the specified key and value.
This method is the poyglot version of {@link LocalMap#remove}.
Replace the entry only if there is an existing entry with the key
Replace the entry only if there is an existing entry with the specified key and value.
This method is the polyglot version of {@link LocalMap#replace}.
Get the size of the map
Generated using TypeDoc
Local maps can be used to share data safely in a single Vert.x instance.
By default the map allows immutable keys and values. Custom keys and values should implement {@link Shareable} interface. The map returns their copies.
This ensures there is no shared access to mutable state from different threads (e.g. different event loops) in the Vert.x instance, and means you don't have to protect access to that state using synchronization or locks.
Since the version 3.4, this class extends the interface. However some methods are only accessible in Java.