wg / lettuce

Scalable Java Redis client
Apache License 2.0
229 stars 61 forks source link

Using Async Connection #29

Open allas opened 10 years ago

allas commented 10 years ago

I am using the following to create the connection. client = new RedisClient(config.getRedisHost()); async = client.connectAsync(); async.set("test", "123"); async.get("test"); I am not seeing the keys in the Redis. I also used 'async.lpush' after the set, still not seeing it. Is there anything I am missing here that I should be doing? Please help me with this.

wg commented 10 years ago

Hi @allas, are you checking that the keys are set with a lettuce connection? Or via redis-cli or something else? If you're using the same async connection you must wait for completion of the futures. The awaitAll(...) method can help.

allas commented 10 years ago

I am using redis-cli for checking the keys. I am not using awaitAll(...) method but will give this a try. Thanks for your response!

On Tuesday, March 4, 2014, Will Glozer notifications@github.com wrote:

Hi @allas https://github.com/allas, are you checking that the keys are set with a lettuce connection? Or via redis-cli or something else? If you're using the same async connection you must wait for completion of the futures. The awaitAll(...) method can help.

Reply to this email directly or view it on GitHubhttps://github.com/wg/lettuce/issues/29#issuecomment-36702742 .