Class GuavaStorage<K,​V,​R extends BiPredicate<K,​V>>

    • Field Detail

      • cache

        protected final com.google.common.cache.Cache<K,​V> cache
    • Constructor Detail

      • GuavaStorage

        public GuavaStorage​(StorageType<K,​V> type)
    • Method Detail

      • clear

        public void clear()
        Description copied from interface: Storage
        Removes all keys
        Specified by:
        clear in interface Storage<K,​V>
      • get

        public V get​(K key)
        Description copied from interface: Storage
        Returns the value associated with the given key, or null if not present.
        Specified by:
        get in interface Storage<K,​V>
      • remove

        public void remove​(K key)
        Description copied from interface: Storage
        Removes the given key.
        Specified by:
        remove in interface Storage<K,​V>
      • removeAll

        public void removeAll​(Collection<K> keys)
        Description copied from interface: Storage
        Removes all the given keys.
        Specified by:
        removeAll in interface Storage<K,​V>
      • set

        public void set​(K key,
                        V value)
        Description copied from interface: Storage
        Adds a value to the store
        Specified by:
        set in interface Storage<K,​V>
      • onRemove

        protected void onRemove​(K key,
                                V value)