Class FastValueAccessMap<K,V>

java.lang.Object
fr.gouv.vitam.worker.core.utils.FastValueAccessMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class FastValueAccessMap<K,V> extends Object implements Map<K,V>
Deprecated.
Hacky implementation for HashMap with fast "containsKey" O(1) method. Refactoring existing code is too risky and requires a full rewrite of ExtractSedaActionHandler and ArchiveUnitListener classes. Entry values are stored in a dedicated Map of Key to Integer Counter that tracks the values and their reference count. Null values are wrapped over a NULL_VALUE_OBJ object because HashMap implementation does not support nulls are keys. Sorry for the inconvenience.
  • Constructor Details

    • FastValueAccessMap

      public FastValueAccessMap()
      Deprecated.
  • Method Details

    • size

      public int size()
      Deprecated.
      Specified by:
      size in interface Map<K,V>
    • isEmpty

      public boolean isEmpty()
      Deprecated.
      Specified by:
      isEmpty in interface Map<K,V>
    • containsKey

      public boolean containsKey(Object o)
      Deprecated.
      Specified by:
      containsKey in interface Map<K,V>
    • containsValue

      public boolean containsValue(Object v)
      Deprecated.
      Specified by:
      containsValue in interface Map<K,V>
    • get

      public V get(Object o)
      Deprecated.
      Specified by:
      get in interface Map<K,V>
    • put

      public V put(K k, V v)
      Deprecated.
      Specified by:
      put in interface Map<K,V>
    • remove

      public V remove(Object k)
      Deprecated.
      Specified by:
      remove in interface Map<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> map)
      Deprecated.
      Specified by:
      putAll in interface Map<K,V>
    • clear

      public void clear()
      Deprecated.
      Specified by:
      clear in interface Map<K,V>
    • keySet

      public Set<K> keySet()
      Deprecated.
      Specified by:
      keySet in interface Map<K,V>
    • values

      public Collection<V> values()
      Deprecated.
      Specified by:
      values in interface Map<K,V>
    • entrySet

      public Set<Map.Entry<K,V>> entrySet()
      Deprecated.
      Specified by:
      entrySet in interface Map<K,V>