Renchunbing / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
1 stars 0 forks source link

Add new methods for incr/decr #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
mail from Jakub

Hi Dennis!

I wonder if you can extend Xmemcached client API 
(net.rubyeye.xmemcached.MemcachedClient) and add following methods:

    * long decr(String key, long delta, long initValue, long timeout, int exp) throws TimeoutException, InterruptedException, MemcachedException
    * long incr(String key, long delta, long initValue, long timeout, int exp) throws TimeoutException, InterruptedException, MemcachedException

Those methods will allow me to set expiration time on new created counter, they 
can by easy implemented by adding exp parameter to 'sendIncrOrDecrCommand' 
method and use it in 'add' method.
Having those method will help me to easily migrate from spymemcached to 
xmemcached.

Best regards,
Jakub

Original issue reported on code.google.com by killme2...@gmail.com on 27 Oct 2010 at 6:52

GoogleCodeExporter commented 9 years ago
It's fixed by revision [r715 
http://code.google.com/p/xmemcached/source/detail?r=715]

Original comment by killme2...@gmail.com on 27 Nov 2010 at 5:03