class HostMap
- Global
- This class is global
Augments
events.EventEmitter
Events
add
Emitted when a host is added to the map
remove
Emitted when a host is removed from the map
Constructor
new
HostMap
()Represents an associative-array of hosts
that can be iterated.
It creates an internal copy when adding or removing, making it safe to iterate using the values() method within async operations.
Methods
clear
()Removes all items from the map.
forEach
(callback)Executes a provided function once per map element.
keys
()Returns an array of host addresses.
remove
(String
key)
Removes an item from the map.
values
()Returns a shallow copy of the values of the map.