Class JournalHashMap<K,​V,​C>

  • All Implemented Interfaces:
    Map<K,​V>

    public class JournalHashMap<K,​V,​C>
    extends Object
    implements Map<K,​V>
    • Method Detail

      • getCollectionId

        public long getCollectionId()
      • size

        public int size()
        Specified by:
        size in interface Map<K,​V>
      • getContext

        public C getContext()
      • isEmpty

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

        public boolean containsKey​(Object key)
        Specified by:
        containsKey in interface Map<K,​V>
      • get

        public V get​(Object key)
        Specified by:
        get in interface Map<K,​V>
      • reload

        public void reload​(JournalHashMap.MapRecord<K,​V> reloadValue)
        This is to be called from a single thread during reload, no need to be synchronized
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface Map<K,​V>
      • remove

        public V remove​(Object key)
        Specified by:
        remove in interface Map<K,​V>
      • remove

        public V remove​(Object key,
                        long transactionID)
        This method will remove the element from the HashMap immediately however the record is still part of a transaction. This is not playing with rollbacks. So a rollback on the transaction wouldn't place the elements back. This is intended to make sure the operation would be atomic in case of a failure, while an appendRollback is not expected.
      • putAll

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

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

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

        public Collection<V> values()
        Not implemented yet, you may use valuesCopy.
        Specified by:
        values in interface Map<K,​V>
      • entrySet

        public Set<Map.Entry<K,​V>> entrySet()
        Not implemented yet, you may use entrySetCoy
        Specified by:
        entrySet in interface Map<K,​V>
      • forEach

        public void forEach​(BiConsumer<? super K,​? super V> action)
        Specified by:
        forEach in interface Map<K,​V>