Interface Storage<K,​V>

  • Type Parameters:
    K -
    V -
    All Known Implementing Classes:
    MapStorage

    public interface Storage<K,​V>
    This interface represents the minimal abstraction to store data. It might be merged into ObjectStore in the long run. See drools-reliability module for alternative implementations
    • Method Detail

      • get

        V get​(K key)
      • put

        V put​(K key,
              V value)
      • putAll

        void putAll​(java.util.Map<? extends K,​? extends V> otherMap)
      • containsKey

        boolean containsKey​(K key)
      • remove

        V remove​(K key)
      • keySet

        java.util.Set<K> keySet()
      • values

        java.util.Collection<V> values()
      • clear

        void clear()
      • size

        int size()
      • isEmpty

        boolean isEmpty()
      • getOrDefault

        V getOrDefault​(K key,
                       V value)
      • requiresFlush

        default boolean requiresFlush()
      • flush

        default void flush()
      • fromMap

        static <K,​V> Storage<K,​V> fromMap​(java.util.Map<K,​V> input)