Class KEYS

java.lang.Object
com.reve.redis.cluster.command.KEYS
All Implemented Interfaces:
RedisCommand

public class KEYS extends Object implements RedisCommand
Asynchronously callable KEYS command class. Keys command can't be run on full cluster. We must run this command to each of the master nodes of a cluster separately and merge all the result.
  • Constructor Details

    • KEYS

      public KEYS()
  • Method Details

    • execute

      public static Set<String> execute(String regEx, ClusterObserver clusterObserver) throws Exception
      Parameters:
      regEx - Regular expression which will be searched in all available Nodes present in the given JedisCluster
      clusterObserver - Command KEYS will be run in this instance of Cluster.
      Returns:
      the HashSet<String> containing all the keys that matches the given regular expression in the whole cluster.
      Throws:
      Exception - if any occurs while executing the command.