Class Connector

java.lang.Object
com.reve.redis.cluster.Connector
All Implemented Interfaces:
Callable<redis.clients.jedis.JedisCluster>

public class Connector extends Object implements Callable<redis.clients.jedis.JedisCluster>
This class will asynchronously connect to the redis cluster. If connection is successful it will return a JedisCluster instance
  • Constructor Summary

    Constructors
    Constructor
    Description
    Connector(Vector<redis.clients.jedis.JedisCluster> clusterConnections, Set<redis.clients.jedis.HostAndPort> jedisClusterAddresses, String redisPassword, com.reve.websocket.ssl.SSLConfiguration configuration)
    Creates a connector process which can be run bu ExecutorService in background
  • Method Summary

    Modifier and Type
    Method
    Description
    redis.clients.jedis.JedisCluster
    Asynchronous call to connect the redis cluster

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Connector

      public Connector(Vector<redis.clients.jedis.JedisCluster> clusterConnections, Set<redis.clients.jedis.HostAndPort> jedisClusterAddresses, String redisPassword, com.reve.websocket.ssl.SSLConfiguration configuration)
      Creates a connector process which can be run bu ExecutorService in background
      Parameters:
      clusterConnections - this process will create a JedisCluster connection to the given server and add it in this connection list
      jedisClusterAddresses - this list must contain at lease one node HostAndPort to connect to the cluster
      redisPassword - the redis password to connect to redis node
      configuration - the instance of SSLConfiguration if ssl is enable for remote redis cluster, user must send this configuration otherwise null for non ssl redis cluster
  • Method Details

    • call

      public redis.clients.jedis.JedisCluster call() throws Exception
      Asynchronous call to connect the redis cluster
      Specified by:
      call in interface Callable<redis.clients.jedis.JedisCluster>
      Returns:
      A JedisCluster connection to the cluster
      Throws:
      Exception