Class SnapshotMap<K,V>

java.lang.Object
org.apache.bookkeeper.util.SnapshotMap<K,V>

public class SnapshotMap<K,V> extends Object
A snapshotable map.
  • Field Details

  • Constructor Details

    • SnapshotMap

      public SnapshotMap()
  • Method Details

    • snapshot

      public NavigableMap<K,V> snapshot()
      Create a snapshot of current map.
      Returns:
      a snapshot of current map.
    • put

      public void put(K key, V value)
      Associates the specified value with the specified key in this map.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
    • remove

      public void remove(K key)
      Removes the mapping for the key from this map if it is present.
      Parameters:
      key - Key whose mapping is to be removed from this map.
    • containsKey

      public boolean containsKey(K key)
      Returns true if this map contains a mapping for the specified key.
      Parameters:
      key - Key whose presence is in the map to be tested.
      Returns:
      true if the map contains a mapping for the specified key.