Search in sources :

Example 51 with JedisShardInfo

use of redis.clients.jedis.JedisShardInfo in project jedis by xetorthio.

the class JedisTest method connectWithShardInfo.

@Test
public void connectWithShardInfo() {
    JedisShardInfo shardInfo = new JedisShardInfo("localhost", Protocol.DEFAULT_PORT);
    shardInfo.setPassword("foobared");
    Jedis jedis = new Jedis(shardInfo);
    jedis.get("foo");
}
Also used : BinaryJedis(redis.clients.jedis.BinaryJedis) Jedis(redis.clients.jedis.Jedis) JedisShardInfo(redis.clients.jedis.JedisShardInfo) Test(org.junit.Test)

Aggregations

JedisShardInfo (redis.clients.jedis.JedisShardInfo)51 Test (org.junit.Test)40 ShardedJedis (redis.clients.jedis.ShardedJedis)38 ArrayList (java.util.ArrayList)36 Jedis (redis.clients.jedis.Jedis)36 URI (java.net.URI)13 GenericObjectPoolConfig (org.apache.commons.pool2.impl.GenericObjectPoolConfig)10 ShardedJedisPool (redis.clients.jedis.ShardedJedisPool)10 Sharded (redis.clients.util.Sharded)8 SSLSocketFactory (javax.net.ssl.SSLSocketFactory)6 Before (org.junit.Before)6 SSLParameters (javax.net.ssl.SSLParameters)5 ShardedJedisPipeline (redis.clients.jedis.ShardedJedisPipeline)4 HostnameVerifier (javax.net.ssl.HostnameVerifier)3 JedisConnectionException (redis.clients.jedis.exceptions.JedisConnectionException)3 JedisConnectionFactory (org.springframework.data.redis.connection.jedis.JedisConnectionFactory)2 BinaryJedis (redis.clients.jedis.BinaryJedis)2 EndPointAccessor (com.navercorp.pinpoint.plugin.redis.EndPointAccessor)1 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)1 CertificateException (java.security.cert.CertificateException)1