Interface KeyStore<K extends Comparable<K>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(int shardId, K key)
      Add the given key under a shard index.
      void clear​(int shardId)
      Removes all keys stored under a given shard index.
      Set<K> keys​(int shardId)
      Return an unmodifiable Set of keys for the given shard index.
      void remove​(int shardId, K key)
      Remove the given key from a shard index.
    • Method Detail

      • add

        void add​(int shardId,
                 K key)
        Add the given key under a shard index.
        Parameters:
        shardId - the shard index a key will be associated under
        key - the actual key to store
      • remove

        void remove​(int shardId,
                    K key)
        Remove the given key from a shard index.
        Parameters:
        shardId - the shard index a key will be removed from
        key - the actual key to remove
      • clear

        void clear​(int shardId)
        Removes all keys stored under a given shard index.
        Parameters:
        shardId - the shard index to remove all keys from
      • keys

        Set<K> keys​(int shardId)
        Return an unmodifiable Set of keys for the given shard index.
        Parameters:
        shardId - the shard index to obtain its keys from
        Returns:
        a Set with keys