Class RedissonClusterConnection

  • All Implemented Interfaces:
    org.springframework.data.redis.connection.HyperLogLogCommands, org.springframework.data.redis.connection.RedisClusterCommands, org.springframework.data.redis.connection.RedisClusterConnection, org.springframework.data.redis.connection.RedisCommands, org.springframework.data.redis.connection.RedisConnection, org.springframework.data.redis.connection.RedisConnectionCommands, org.springframework.data.redis.connection.RedisGeoCommands, org.springframework.data.redis.connection.RedisHashCommands, org.springframework.data.redis.connection.RedisKeyCommands, org.springframework.data.redis.connection.RedisListCommands, org.springframework.data.redis.connection.RedisPubSubCommands, org.springframework.data.redis.connection.RedisScriptingCommands, org.springframework.data.redis.connection.RedisServerCommands, org.springframework.data.redis.connection.RedisSetCommands, org.springframework.data.redis.connection.RedisStringCommands, org.springframework.data.redis.connection.RedisTxCommands, org.springframework.data.redis.connection.RedisZSetCommands

    public class RedissonClusterConnection
    extends RedissonConnection
    implements org.springframework.data.redis.connection.RedisClusterConnection
    Author:
    Nikita Koksharov
    • Constructor Detail

      • RedissonClusterConnection

        public RedissonClusterConnection​(org.redisson.api.RedissonClient redisson)
    • Method Detail

      • clusterGetNodes

        public Iterable<org.springframework.data.redis.connection.RedisClusterNode> clusterGetNodes()
        Specified by:
        clusterGetNodes in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetSlaves

        public Collection<org.springframework.data.redis.connection.RedisClusterNode> clusterGetSlaves​(org.springframework.data.redis.connection.RedisClusterNode master)
        Specified by:
        clusterGetSlaves in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetMasterSlaveMap

        public Map<org.springframework.data.redis.connection.RedisClusterNode,​Collection<org.springframework.data.redis.connection.RedisClusterNode>> clusterGetMasterSlaveMap()
        Specified by:
        clusterGetMasterSlaveMap in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetSlotForKey

        public Integer clusterGetSlotForKey​(byte[] key)
        Specified by:
        clusterGetSlotForKey in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetNodeForSlot

        public org.springframework.data.redis.connection.RedisClusterNode clusterGetNodeForSlot​(int slot)
        Specified by:
        clusterGetNodeForSlot in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetNodeForKey

        public org.springframework.data.redis.connection.RedisClusterNode clusterGetNodeForKey​(byte[] key)
        Specified by:
        clusterGetNodeForKey in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetClusterInfo

        public org.springframework.data.redis.connection.ClusterInfo clusterGetClusterInfo()
        Specified by:
        clusterGetClusterInfo in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterAddSlots

        public void clusterAddSlots​(org.springframework.data.redis.connection.RedisClusterNode node,
                                    int... slots)
        Specified by:
        clusterAddSlots in interface org.springframework.data.redis.connection.RedisClusterCommands
      • convert

        protected List<Integer> convert​(int... slots)
      • clusterAddSlots

        public void clusterAddSlots​(org.springframework.data.redis.connection.RedisClusterNode node,
                                    org.springframework.data.redis.connection.RedisClusterNode.SlotRange range)
        Specified by:
        clusterAddSlots in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterCountKeysInSlot

        public Long clusterCountKeysInSlot​(int slot)
        Specified by:
        clusterCountKeysInSlot in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterDeleteSlots

        public void clusterDeleteSlots​(org.springframework.data.redis.connection.RedisClusterNode node,
                                       int... slots)
        Specified by:
        clusterDeleteSlots in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterDeleteSlotsInRange

        public void clusterDeleteSlotsInRange​(org.springframework.data.redis.connection.RedisClusterNode node,
                                              org.springframework.data.redis.connection.RedisClusterNode.SlotRange range)
        Specified by:
        clusterDeleteSlotsInRange in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterForget

        public void clusterForget​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        clusterForget in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterMeet

        public void clusterMeet​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        clusterMeet in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterSetSlot

        public void clusterSetSlot​(org.springframework.data.redis.connection.RedisClusterNode node,
                                   int slot,
                                   org.springframework.data.redis.connection.RedisClusterCommands.AddSlots mode)
        Specified by:
        clusterSetSlot in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterGetKeysInSlot

        public List<byte[]> clusterGetKeysInSlot​(int slot,
                                                 Integer count)
        Specified by:
        clusterGetKeysInSlot in interface org.springframework.data.redis.connection.RedisClusterCommands
      • clusterReplicate

        public void clusterReplicate​(org.springframework.data.redis.connection.RedisClusterNode master,
                                     org.springframework.data.redis.connection.RedisClusterNode slave)
        Specified by:
        clusterReplicate in interface org.springframework.data.redis.connection.RedisClusterCommands
      • ping

        public String ping​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        ping in interface org.springframework.data.redis.connection.RedisClusterConnection
      • bgReWriteAof

        public void bgReWriteAof​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        bgReWriteAof in interface org.springframework.data.redis.connection.RedisClusterConnection
      • bgSave

        public void bgSave​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        bgSave in interface org.springframework.data.redis.connection.RedisClusterConnection
      • lastSave

        public Long lastSave​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        lastSave in interface org.springframework.data.redis.connection.RedisClusterConnection
      • save

        public void save​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        save in interface org.springframework.data.redis.connection.RedisClusterConnection
      • dbSize

        public Long dbSize​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        dbSize in interface org.springframework.data.redis.connection.RedisClusterConnection
      • getEntry

        protected org.redisson.connection.MasterSlaveEntry getEntry​(org.springframework.data.redis.connection.RedisClusterNode node)
      • flushDb

        public void flushDb​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        flushDb in interface org.springframework.data.redis.connection.RedisClusterConnection
      • flushAll

        public void flushAll​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        flushAll in interface org.springframework.data.redis.connection.RedisClusterConnection
      • info

        public Properties info​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        info in interface org.springframework.data.redis.connection.RedisClusterConnection
      • info

        public Properties info​(org.springframework.data.redis.connection.RedisClusterNode node,
                               String section)
        Specified by:
        info in interface org.springframework.data.redis.connection.RedisClusterConnection
      • keys

        public Set<byte[]> keys​(org.springframework.data.redis.connection.RedisClusterNode node,
                                byte[] pattern)
        Specified by:
        keys in interface org.springframework.data.redis.connection.RedisClusterConnection
      • randomKey

        public byte[] randomKey​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        randomKey in interface org.springframework.data.redis.connection.RedisClusterConnection
      • shutdown

        public void shutdown​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        shutdown in interface org.springframework.data.redis.connection.RedisClusterConnection
      • getConfig

        public List<String> getConfig​(org.springframework.data.redis.connection.RedisClusterNode node,
                                      String pattern)
        Specified by:
        getConfig in interface org.springframework.data.redis.connection.RedisClusterConnection
      • setConfig

        public void setConfig​(org.springframework.data.redis.connection.RedisClusterNode node,
                              String param,
                              String value)
        Specified by:
        setConfig in interface org.springframework.data.redis.connection.RedisClusterConnection
      • resetConfigStats

        public void resetConfigStats​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        resetConfigStats in interface org.springframework.data.redis.connection.RedisClusterConnection
      • time

        public Long time​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        time in interface org.springframework.data.redis.connection.RedisClusterConnection
      • getClientList

        public List<org.springframework.data.redis.core.types.RedisClientInfo> getClientList​(org.springframework.data.redis.connection.RedisClusterNode node)
        Specified by:
        getClientList in interface org.springframework.data.redis.connection.RedisClusterConnection