Class RedisConnection

java.lang.Object
org.redisson.client.RedisConnection
All Implemented Interfaces:
RedisCommands
Direct Known Subclasses:
RedisPubSubConnection

public class RedisConnection extends Object implements RedisCommands
Author:
Nikita Koksharov
  • Constructor Details

    • RedisConnection

      public RedisConnection(RedisClient redisClient, io.netty.channel.Channel channel, CompletableFuture<C> connectionPromise)
    • RedisConnection

      protected RedisConnection(RedisClient redisClient)
  • Method Details

    • fireConnected

      public void fireConnected()
    • incUsage

      public int incUsage()
    • getUsage

      public int getUsage()
    • decUsage

      public int decUsage()
    • setConnectedListener

      public void setConnectedListener(Runnable connectedListener)
    • fireDisconnected

      public void fireDisconnected()
    • setDisconnectedListener

      public void setDisconnectedListener(Runnable disconnectedListener)
    • getConnectionPromise

      public <C extends RedisConnection> CompletableFuture<C> getConnectionPromise()
    • getFrom

      public static <C extends RedisConnection> C getFrom(io.netty.channel.Channel channel)
    • getLastCommand

      public CommandData<?,?> getLastCommand()
    • clearCurrentCommand

      public void clearCurrentCommand()
    • getCurrentCommand

      public CommandData<?,?> getCurrentCommand()
    • getLastUsageTime

      public long getLastUsageTime()
    • setLastUsageTime

      public void setLastUsageTime(long lastUsageTime)
    • isOpen

      public boolean isOpen()
    • isActive

      public boolean isActive()
      Check is channel connected and ready for transfer
      Returns:
      true if so
    • updateChannel

      public void updateChannel(io.netty.channel.Channel channel)
    • getRedisClient

      public RedisClient getRedisClient()
    • await

      public <R> R await(CompletableFuture<R> future)
    • sync

      public <T> T sync(RedisCommand<T> command, Object... params)
    • send

      public <T, R> io.netty.channel.ChannelFuture send(CommandData<T,R> data)
    • send

      public io.netty.channel.ChannelFuture send(CommandsData data)
    • sync

      public <T, R> R sync(Codec encoder, RedisCommand<T> command, Object... params)
    • async

      public <T, R> RFuture<R> async(RedisCommand<T> command, Object... params)
    • async

      public <T, R> RFuture<R> async(long timeout, RedisCommand<T> command, Object... params)
    • async

      public <T, R> RFuture<R> async(Codec encoder, RedisCommand<T> command, Object... params)
    • async

      public <T, R> RFuture<R> async(long timeout, Codec encoder, RedisCommand<T> command, Object... params)
    • create

      public <T, R> CommandData<T,R> create(Codec encoder, RedisCommand<T> command, Object... params)
    • isClosed

      public boolean isClosed()
    • isFastReconnect

      public boolean isFastReconnect()
    • clearFastReconnect

      public void clearFastReconnect()
    • forceFastReconnectAsync

      public CompletableFuture<Void> forceFastReconnectAsync()
    • getChannel

      public io.netty.channel.Channel getChannel()
      Access to Netty channel. This method is provided to use in debug info only.
      Returns:
      channel
    • closeAsync

      public io.netty.channel.ChannelFuture closeAsync()
    • toString

      public String toString()
      Overrides:
      toString in class Object