ConnectionSpec cs = DefaultConnectionSpec.newSpec();
InetAddress ia = InetAddress.getByName(addr);
cs.setSocketFlag(ConnectionSpec.SocketFlag.SO_KEEP_ALIVE,
true);
cs.setReconnectCnt(3);
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_PREF_BANDWIDTH,
0);
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_PREF_CONN_TIME,
2);
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_TIMEOUT,
3000);
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_PREF_LATENCY,
1);
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_RCVBUF,
1024 * 128); // // set RCV buffer to 128KB
cs.setSocketProperty(DefaultConnectionSpec.SocketProperty.SO_SNDBUF,
1024 * 128); // // set SND buffer to 128KB
cs.setAddress(ia);
cs.setPort(port);
cs.setCredentials("pwd".getBytes());
cs.setDatabase(0);
jRedisFuture = new JRedisAsynchClient(cs);
Not sure what the issue is based on what you posted. [I am assuming
you are using the latest jars or source from master (?)]
That said, the JRedisAsynch client is perhaps the least developed/
tested of the connectors. (It'll probably get phased out in for Redis
2.0.) Try JRedisPipeline which has the same Future semantics.
Regardless, if you have more details it would be helpful.
/R
jRedisFuture.incr(pvKey);
sometimes this code not +1, connected_clients count reduce