@Test public void getClient() throws ConnectionException, IOException { MultiRedisClient redisClient = new MultiRedisClient("", 2); Client firstClient = redisClient.getClient(); redisClient.getClient(); redisClient.getClient(); assertEquals(firstClient, redisClient.getClient()); }
protected Client getClient() { final int index = currentIndex.incrementAndGet() % redisClients.size(); return redisClients.get(index); }
MultiRedisClient implements Client { protected Client getClient() { final int index = currentIndex.incrementAndGet() % redisClients.size(); return redisClients.get(index); } }
MultiRedisClient implements Client { protected Client getClient() { final int index = currentIndex.incrementAndGet() % redisClients.size(); return redisClients.get(index); } MultiRedisClient(final String host, final int port);  MultiRedisClient(final String host, final int port, final int concurrencyLevel); }
MultiRedisClient implements Client { protected Client getClient() { final int index = currentIndex.incrementAndGet() % redisClients.size(); return redisClients.get(index); } MultiRedisClient(final String host, final int port);  MultiRedisClient(final String host, final int port, final int concurrencyLevel); @Override void ping(); @Override void set(byte[] key, byte[] value); @Override void set(byte[] key, byte[] value, long expiryInMillis); @Override byte[] get(byte[] key); @Override byte[] expire(byte[] key); @Override void flushdb(); @Override int dbsize(); }
MultiRedisClient implements Client { protected Client getClient() { final int index = currentIndex.incrementAndGet() % redisClients.size(); return redisClients.get(index); } MultiRedisClient(final String host, final int port);  MultiRedisClient(final String host, final int port, final int concurrencyLevel); @Override void ping(); @Override void set(byte[] key, byte[] value); @Override void set(byte[] key, byte[] value, long expiryInMillis); @Override byte[] get(byte[] key); @Override byte[] expire(byte[] key); @Override void flushdb(); @Override int dbsize(); static final int CONCURRENCY_LEVEL; }