Class MapBackedStore<V>

java.lang.Object
org.apache.drill.exec.coord.store.BaseTransientStore<V>
org.apache.drill.exec.coord.local.MapBackedStore<V>
All Implemented Interfaces:
AutoCloseable, TransientStore<V>

public class MapBackedStore<V> extends BaseTransientStore<V>
  • Constructor Details

  • Method Details

    • get

      public V get(String key)
      Description copied from interface: TransientStore
      Returns a value corresponding to the given look-up key if exists, null otherwise.
      Parameters:
      key - look-up key
    • put

      public V put(String key, V value)
      Description copied from interface: TransientStore
      Stores the given (key, value) in this store overriding the existing value.
      Parameters:
      key - look-up key
      value - value to store
      Returns:
      the old value if the key exists, null otherwise
    • putIfAbsent

      public V putIfAbsent(String key, V value)
      Description copied from interface: TransientStore
      Stores the given (key, value) tuple in this store only if it does not exists.
      Parameters:
      key - look-up key
      value - value to store
      Returns:
      the old value if the key exists, null otherwise
    • remove

      public V remove(String key)
      Description copied from interface: TransientStore
      Removes the (key, value) tuple from this store if the key exists.
      Parameters:
      key - look-up key
      Returns:
      the removed value if key exists, null otherwise
    • entries

      public Iterator<Map.Entry<String,V>> entries()
      Description copied from interface: TransientStore
      Returns an iterator of (key, value) tuples.
    • size

      public int size()
      Description copied from interface: TransientStore
      Returns number of entries.
    • close

      public void close() throws Exception
      Throws:
      Exception