Interface DataStore<V extends java.io.Serializable>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      DataStore<V> clear()
      Deletes all of the stored keys and values.
      boolean containsKey​(java.lang.String key)
      Returns whether the store contains the given key.
      boolean containsValue​(V value)
      Returns whether the store contains the given value.
      DataStore<V> delete​(java.lang.String key)
      Deletes the stored key and value based on the given key, or ignored if the key doesn't already exist.
      V get​(java.lang.String key)
      Returns the stored value for the given key or null if not found.
      DataStoreFactory getDataStoreFactory()
      Returns the data store factory.
      java.lang.String getId()
      Returns the data store ID.
      boolean isEmpty()
      Returns whether there are any stored keys.
      java.util.Set<java.lang.String> keySet()
      Returns the unmodifiable set of all stored keys.
      DataStore<V> set​(java.lang.String key, V value)
      Stores the given value for the given key (replacing any existing value).
      int size()
      Returns the number of stored keys.
      java.util.Collection<V> values()
      Returns the unmodifiable collection of all stored values.
    • Method Detail

      • getDataStoreFactory

        DataStoreFactory getDataStoreFactory()
        Returns the data store factory.
      • getId

        java.lang.String getId()
        Returns the data store ID.
      • size

        int size()
          throws java.io.IOException
        Returns the number of stored keys.
        Throws:
        java.io.IOException
      • isEmpty

        boolean isEmpty()
                 throws java.io.IOException
        Returns whether there are any stored keys.
        Throws:
        java.io.IOException
      • containsKey

        boolean containsKey​(java.lang.String key)
                     throws java.io.IOException
        Returns whether the store contains the given key.
        Throws:
        java.io.IOException
      • containsValue

        boolean containsValue​(V value)
                       throws java.io.IOException
        Returns whether the store contains the given value.
        Throws:
        java.io.IOException
      • keySet

        java.util.Set<java.lang.String> keySet()
                                        throws java.io.IOException
        Returns the unmodifiable set of all stored keys.

        Order of the keys is not specified.

        Throws:
        java.io.IOException
      • values

        java.util.Collection<V> values()
                                throws java.io.IOException
        Returns the unmodifiable collection of all stored values.
        Throws:
        java.io.IOException
      • get

        V get​(java.lang.String key)
        throws java.io.IOException
        Returns the stored value for the given key or null if not found.
        Parameters:
        key - key or null for null result
        Throws:
        java.io.IOException
      • set

        DataStore<V> set​(java.lang.String key,
                         V value)
                  throws java.io.IOException
        Stores the given value for the given key (replacing any existing value).
        Parameters:
        key - key
        value - value object
        Throws:
        java.io.IOException
      • clear

        DataStore<V> clear()
                    throws java.io.IOException
        Deletes all of the stored keys and values.
        Throws:
        java.io.IOException
      • delete

        DataStore<V> delete​(java.lang.String key)
                     throws java.io.IOException
        Deletes the stored key and value based on the given key, or ignored if the key doesn't already exist.
        Parameters:
        key - key or null to ignore
        Throws:
        java.io.IOException