kenorb / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

getBulk() feature #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I want a new feature in MemcachedClient - method which will return me few 
objects with cas values. Something like that:
public Map<String, CASValue<Object>> getBulk(Collection<String> keys)

Is it possible to have this feature in future?

Original issue reported on code.google.com by Alexander.Petrichkovich@gmail.com on 16 Dec 2010 at 11:55

GoogleCodeExporter commented 9 years ago
According on response from memcached developers it is possible.

http://code.google.com/p/memcached/issues/detail?id=180

Original comment by Alexander.Petrichkovich@gmail.com on 23 Dec 2010 at 11:56

GoogleCodeExporter commented 9 years ago
I surely did say it was possible.  We'll have to figure out how to represent it 
in the client, though.  My client refactoring branch has again gone stale -- 
that makes things like the above quite trivial.  This may just be more of a 
reason to make progress on that again.

Original comment by dsalli...@gmail.com on 25 Dec 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Oh, you're working on both projects :) Thank you for your job - it's realy 
awesome. 

It'll be very good to have ability to work with memory cache in more secure way 
(having CAS values for all objects) on highly loaded projects where few threads 
try to change the same object.

Good luck.

Original comment by Alexander.Petrichkovich@gmail.com on 26 Dec 2010 at 1:29

GoogleCodeExporter commented 9 years ago
Hi, I'm finishing to work on my framework wich use spymemcached and I don't 
want to modify my code in future.
So, I've implemented getsBulk() mock method in MemcachedClient.java (also will 
implement others for individual use) waiting for your correct implementation.
I expect you'll approve my proposal to API (I know that you're hardly working, 
so today I need just your approval for new methods in MemcachedClientIF.java; 
you can implement them later - it will increase performance) .

Here are my proposal methods:

public 
java.util.Map<java.lang.String,net.spy.memcached.CASValue<java.lang.Object>> 
getsBulk(java.util.Collection<java.lang.String> keys) throws 
net.spy.memcached.OperationTimeoutException;

public java.util.concurrent.Future<java.lang.Boolean> 
deleteBulk(java.util.Collection<java.lang.String> keys);

public java.util.concurrent.Future<java.lang.Boolean> 
addBulk(java.util.Collection<java.lang.String> keys, int exp, java.lang.Object 
o);

public net.spy.memcached.CASResponse 
casBulk(java.util.Collection<java.lang.String> keys, long casId, 
java.lang.Object value)

Original comment by Alexander.Petrichkovich@gmail.com on 5 Jan 2011 at 9:10