Class RedisNode

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clusterAddSlots​(int... slots)
      Adds slots to this Redis node
      > clusterAddSlotsAsync​(int... slots)
      Adds slots to this Redis node
      long  nodeId)
      Returns number of failure reports for Redis node by defined id
      >  nodeId)
      Returns number of failure reports for Redis node by defined id
      long clusterCountKeysInSlot​(int slot)
      Counts keys in defined slot
      > clusterCountKeysInSlotAsync​(int slot)
      Counts keys in defined slot
      void clusterDeleteSlots​(int... slots)
      Removes slots from this Redis node
      > clusterDeleteSlotsAsync​(int... slots)
      Removes slots from this Redis node
      void clusterFlushSlots()
      Removes all slots from this Redis node
      > clusterFlushSlotsAsync()
      Removes all slots from this Redis node
      void  nodeId)
      Removes Redis node by defined id from Cluster
      >  nodeId)
      Removes Redis node by defined id from Cluster
      <> clusterGetKeysInSlot​(int slot, int count)
      Returns keys in defines slot limited by count
      <>> clusterGetKeysInSlotAsync​(int slot, int count)
      Returns keys in defines slot limited by count
      clusterId()
      Returns id of this Redis node
      > clusterIdAsync()
      Returns id of this Redis node
      <,​> clusterInfo()
      Returns cluster information reported by this Redis node
      <,​>> clusterInfoAsync()
      Returns cluster information reported by this Redis node
      void  address)
      Joins Redis node by the defined address to Cluster
      >  address)
      Joins Redis node by the defined address to Cluster
      void  nodeId)
      Reconfigures this Redis node as replica of Redis node by defined id.
      >  nodeId)
      Reconfigures this Redis node as replica of Redis node by defined id.
      void clusterSetSlot​(int slot, SetSlotCommand command)
      Sets slot to this Redis node according to defined command
      void clusterSetSlot​(int slot, SetSlotCommand command,  nodeId)
      Sets slot to this Redis node according to defined command
      > clusterSetSlotAsync​(int slot, SetSlotCommand command)
      Sets slot to this Redis node according to defined command
      > clusterSetSlotAsync​(int slot, SetSlotCommand command,  nodeId)
      Sets slot to this Redis node according to defined command
      <<>> clusterSlots()
      Return Redis Cluster slots mapped to Redis nodes
      <<>>> clusterSlotsAsync()
      Return Redis Cluster slots mapped to Redis nodes
      boolean  obj)  
      getAddr()
      Get Redis node address
      RedisClient getClient()  
      <,​>  parameter)
      Get value of Redis configuration parameter.
      <,​>>  parameter)
      Get value of Redis configuration parameter.
      <,​> getMemoryStatistics()
      Returns Redis memory statistics
      <,​>> getMemoryStatisticsAsync()
      Returns Redis memory statistics
      int hashCode()  
      <,​> info​(RedisNode.InfoSection section)
      Returns information about Redis node.
      <,​>> infoAsync​(RedisNode.InfoSection section)
      Returns information about Redis node.
      boolean ping()
      Ping Redis node.
      boolean ping​(long timeout,  timeUnit)
      Ping Redis node with specified timeout.
      > pingAsync()
      Ping Redis node.
      > pingAsync​(long timeout,  timeUnit)
      Ping Redis node with specified timeout.
      void  parameter,  value)
      Set value of Redis configuration parameter.
      >  parameter,  value)
      Set value of Redis configuration parameter.
      Time time()
      Returns current Redis server time in seconds
      RFuture<Time> timeAsync()
      Returns current Redis server time in seconds
      toString()  
      • Methods inherited from class java.lang.

        , , , , , , ,
    • Method Detail

      • getAddr

        public  getAddr()
        Description copied from interface: RedisNode
        Get Redis node address
        Specified by:
        getAddr in interface RedisNode
        Returns:
        node address
      • pingAsync

        public > pingAsync()
        Description copied from interface: RedisNodeAsync
        Ping Redis node. Default timeout is 1000 milliseconds
        Specified by:
        pingAsync in interface RedisNodeAsync
        Returns:
        true if "PONG" reply received, false otherwise
      • pingAsync

        public > pingAsync​(long timeout,
                                           timeUnit)
        Description copied from interface: RedisNodeAsync
        Ping Redis node with specified timeout.
        Specified by:
        pingAsync in interface RedisNodeAsync
        Parameters:
        timeout - - ping timeout
        timeUnit - - timeout unit
        Returns:
        true if "PONG" reply received, false otherwise
      • ping

        public boolean ping()
        Description copied from interface: RedisNode
        Ping Redis node. Default timeout is 1000 milliseconds
        Specified by:
        ping in interface RedisNode
        Returns:
        true if "PONG" reply received, false otherwise
      • ping

        public boolean ping​(long timeout,
                             timeUnit)
        Description copied from interface: RedisNode
        Ping Redis node with specified timeout.
        Specified by:
        ping in interface RedisNode
        Parameters:
        timeout - - ping timeout
        timeUnit - - timeout unit
        Returns:
        true if "PONG" reply received, false otherwise
      • hashCode

        public int hashCode()
        Overrides:
         in class 
      • equals

        public boolean equals​( obj)
        Overrides:
         in class 
      • time

        public Time time()
        Description copied from interface: RedisNode
        Returns current Redis server time in seconds
        Specified by:
        time in interface RedisNode
        Returns:
        time in seconds
      • toString

        public  toString()
        Overrides:
         in class 
      • clusterInfo

        public <,​> clusterInfo()
        Description copied from interface: RedisClusterNode
        Returns cluster information reported by this Redis node
        Specified by:
        clusterInfo in interface RedisClusterNode
        Returns:
        cluster information
      • clusterAddSlots

        public void clusterAddSlots​(int... slots)
        Description copied from interface: RedisClusterNode
        Adds slots to this Redis node
        Specified by:
        clusterAddSlots in interface RedisClusterNode
        Parameters:
        slots - slots to add
      • clusterReplicate

        public void clusterReplicate​( nodeId)
        Description copied from interface: RedisClusterNode
        Reconfigures this Redis node as replica of Redis node by defined id.
        Specified by:
        clusterReplicate in interface RedisClusterNode
        Parameters:
        nodeId - Redis node Id
      • clusterDeleteSlots

        public void clusterDeleteSlots​(int... slots)
        Description copied from interface: RedisClusterNode
        Removes slots from this Redis node
        Specified by:
        clusterDeleteSlots in interface RedisClusterNode
        Parameters:
        slots - slots to remove
      • clusterCountKeysInSlot

        public long clusterCountKeysInSlot​(int slot)
        Description copied from interface: RedisClusterNode
        Counts keys in defined slot
        Specified by:
        clusterCountKeysInSlot in interface RedisClusterNode
        Parameters:
        slot - slot
        Returns:
        keys amount
      • clusterGetKeysInSlot

        public <> clusterGetKeysInSlot​(int slot,
                                                 int count)
        Description copied from interface: RedisClusterNode
        Returns keys in defines slot limited by count
        Specified by:
        clusterGetKeysInSlot in interface RedisClusterNode
        Parameters:
        slot - slot
        count - limits keys amount
        Returns:
        keys
      • clusterSetSlot

        public void clusterSetSlot​(int slot,
                                   SetSlotCommand command)
        Description copied from interface: RedisClusterNode
        Sets slot to this Redis node according to defined command
        Specified by:
        clusterSetSlot in interface RedisClusterNode
        Parameters:
        slot - slot
        command - slot command
      • clusterSetSlot

        public void clusterSetSlot​(int slot,
                                   SetSlotCommand command,
                                    nodeId)
        Description copied from interface: RedisClusterNode
        Sets slot to this Redis node according to defined command
        Specified by:
        clusterSetSlot in interface RedisClusterNode
        Parameters:
        slot - slot
        command - slot command
        nodeId - Redis node id
      • clusterMeet

        public void clusterMeet​( address)
        Description copied from interface: RedisClusterNode
        Joins Redis node by the defined address to Cluster

        Address example: redis://127.0.0.1:9233

        Specified by:
        clusterMeet in interface RedisClusterNode
        Parameters:
        address - Redis node address
      • clusterCountFailureReports

        public long clusterCountFailureReports​( nodeId)
        Description copied from interface: RedisClusterNode
        Returns number of failure reports for Redis node by defined id
        Specified by:
        clusterCountFailureReports in interface RedisClusterNode
        Parameters:
        nodeId - Redis node id
        Returns:
        amount of failure reports
      • clusterSlots

        public <<>> clusterSlots()
        Description copied from interface: RedisClusterNode
        Return Redis Cluster slots mapped to Redis nodes
        Specified by:
        clusterSlots in interface RedisClusterNode
        Returns:
        slots mapping
      • info

        public <,​> info​(RedisNode.InfoSection section)
        Description copied from interface: RedisNode
        Returns information about Redis node.
        Specified by:
        info in interface RedisNode
        Parameters:
        section - - section of information
        Returns:
        information
      • getMemoryStatistics

        public <,​> getMemoryStatistics()
        Description copied from interface: RedisNode
        Returns Redis memory statistics
        Specified by:
        getMemoryStatistics in interface RedisNode
        Returns:
        statistics info map
      • clusterReplicateAsync

        public > clusterReplicateAsync​( nodeId)
        Description copied from interface: RedisClusterNodeAsync
        Reconfigures this Redis node as replica of Redis node by defined id.
        Specified by:
        clusterReplicateAsync in interface RedisClusterNodeAsync
        Parameters:
        nodeId - Redis node Id
        Returns:
        void
      • clusterGetKeysInSlotAsync

        public <>> clusterGetKeysInSlotAsync​(int slot,
                                                               int count)
        Description copied from interface: RedisClusterNodeAsync
        Returns keys in defines slot limited by count
        Specified by:
        clusterGetKeysInSlotAsync in interface RedisClusterNodeAsync
        Parameters:
        slot - slot
        count - limits keys amount
        Returns:
        keys
      • clusterMeetAsync

        public > clusterMeetAsync​( address)
        Description copied from interface: RedisClusterNodeAsync
        Joins Redis node by the defined address to Cluster

        Address example: redis://127.0.0.1:9233

        Specified by:
        clusterMeetAsync in interface RedisClusterNodeAsync
        Parameters:
        address - Redis node address
        Returns:
        void
      • getConfig

        public <,​> getConfig​( parameter)
        Description copied from interface: RedisNode
        Get value of Redis configuration parameter.
        Specified by:
        getConfig in interface RedisNode
        Parameters:
        parameter - - name of parameter
        Returns:
        value of parameter
      • setConfig

        public void setConfig​( parameter,
                               value)
        Description copied from interface: RedisNode
        Set value of Redis configuration parameter.
        Specified by:
        setConfig in interface RedisNode
        Parameters:
        parameter - - name of parameter
        value - - value of parameter
      • getConfigAsync

        public <,​>> getConfigAsync​( parameter)
        Description copied from interface: RedisNodeAsync
        Get value of Redis configuration parameter.
        Specified by:
        getConfigAsync in interface RedisNodeAsync
        Parameters:
        parameter - - name of parameter
        Returns:
        value of parameter
      • setConfigAsync

        public > setConfigAsync​( parameter,
                                             value)
        Description copied from interface: RedisNodeAsync
        Set value of Redis configuration parameter.
        Specified by:
        setConfigAsync in interface RedisNodeAsync
        Parameters:
        parameter - - name of parameter
        value - - value of parameter
        Returns:
        void