Interface Storage<K,​V>

  • All Known Subinterfaces:
    ExpirableStorage<K,​V,​R>, LocalStorage<K,​V>, ReplicatedStorage<K,​V>, SharedStorage<K,​V>

    public interface Storage<K,​V>
    Represents a key / value store whose values never expire. When in a cluster, all members will have a local copy of all data. If Cyclos runs in a cluster, the entire cluster will have an unified view of the store.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Removes all keys
      V get​(K key)
      Returns the value associated with the given key, or null if not present.
      void remove​(K key)
      Removes the given key.
      void removeAll​(Collection<K> keys)
      Removes all the given keys.
      void set​(K key, V value)
      Adds a value to the store
    • Method Detail

      • clear

        void clear()
        Removes all keys
      • get

        V get​(K key)
        Returns the value associated with the given key, or null if not present.
      • remove

        void remove​(K key)
        Removes the given key.
      • removeAll

        void removeAll​(Collection<K> keys)
        Removes all the given keys.
      • set

        void set​(K key,
                 V value)
        Adds a value to the store