Interface ClusterCommands

All Known Implementing Classes:
Jedis

public interface ClusterCommands
  • Method Details

    • asking

      String asking()
    • readonly

      String readonly()
    • readwrite

      String readwrite()
    • clusterNodes

      String clusterNodes()
    • clusterMeet

      String clusterMeet(String ip, int port)
    • clusterAddSlots

      String clusterAddSlots(int... slots)
    • clusterDelSlots

      String clusterDelSlots(int... slots)
    • clusterInfo

      String clusterInfo()
    • clusterGetKeysInSlot

      List<String> clusterGetKeysInSlot(int slot, int count)
    • clusterGetKeysInSlotBinary

      List<byte[]> clusterGetKeysInSlotBinary(int slot, int count)
    • clusterSetSlotNode

      String clusterSetSlotNode(int slot, String nodeId)
    • clusterSetSlotMigrating

      String clusterSetSlotMigrating(int slot, String nodeId)
    • clusterSetSlotImporting

      String clusterSetSlotImporting(int slot, String nodeId)
    • clusterSetSlotStable

      String clusterSetSlotStable(int slot)
    • clusterForget

      String clusterForget(String nodeId)
    • clusterFlushSlots

      String clusterFlushSlots()
    • clusterKeySlot

      long clusterKeySlot(String key)
    • clusterCountFailureReports

      long clusterCountFailureReports(String nodeId)
    • clusterCountKeysInSlot

      long clusterCountKeysInSlot(int slot)
    • clusterSaveConfig

      String clusterSaveConfig()
    • clusterSetConfigEpoch

      String clusterSetConfigEpoch(long configEpoch)
      Set a specific config epoch in a fresh node. It only works when the nodes' table of the node is empty or when the node current config epoch is zero.
      Parameters:
      configEpoch -
      Returns:
      OK
    • clusterBumpEpoch

      String clusterBumpEpoch()
      Advance the cluster config epoch.
      Returns:
      BUMPED if the epoch was incremented, or STILL if the node already has the greatest config epoch in the cluster.
    • clusterReplicate

      String clusterReplicate(String nodeId)
    • clusterSlaves

      @Deprecated List<String> clusterSlaves(String nodeId)
      CLUSTER SLAVES command is deprecated since Redis 5.
    • clusterReplicas

      List<String> clusterReplicas(String nodeId)
    • clusterFailover

      String clusterFailover()
    • clusterFailover

      String clusterFailover(ClusterFailoverOption failoverOption)
    • clusterSlots

      List<Object> clusterSlots()
    • clusterReset

      String clusterReset()
    • clusterReset

      String clusterReset(ClusterResetType resetType)
      resetType can be null for default behavior.
      Parameters:
      resetType -
      Returns:
      OK
    • clusterMyId

      String clusterMyId()
    • clusterMyShardId

      String clusterMyShardId()
    • clusterLinks

      List<Map<String,Object>> clusterLinks()
      return the information of all such peer links as an array, where each array element is a map that contains attributes and their values for an individual link.
      Returns:
      the information of all such peer links as an array
      See Also:
    • clusterAddSlotsRange

      String clusterAddSlotsRange(int... ranges)
      Takes a list of slot ranges (specified by start and end slots) to assign to the node
      Parameters:
      ranges - slots range
      Returns:
      OK if the command was successful. Otherwise an error is returned.
    • clusterDelSlotsRange

      String clusterDelSlotsRange(int... ranges)
      Takes a list of slot ranges (specified by start and end slots) to remove to the node.
      Parameters:
      ranges - slots range
      Returns:
      OK if the command was successful. Otherwise an error is returned.