Given
client = new XMemcachedClient(server, port);
What happens if I have several thread doing this:
object = client.get(key);
In the (quite empty) xmemcached javadoc I see no mention of synchronization.
MemcachedClient.get
synchronized? if not, have I got to synchronize it myself?MemcachedClient
per thread or is the current code capable of this already?XMemcachedClient can be used by many threads in paralel. There is not need to synchronize the calling to XMemcachedClient instance. Here's a sample code how many threads can use single client.
On the xmemcached page there's a benchmark which show performance depending on number of threads that use single XMemcachedClient instance.