This content has been marked as final.
Show 2 replies
-
1. Re: async API guarantees
manik Nov 3, 2009 5:26 AM (in response to sannegrinovero)1) Yes. Only the RPC happens in a separate thread. The rest (locking, local update) all happens in the app thread.
2) No, order is not guaranteed. The async API is only recommended for unrelated entries. And yes, using a transaction or a batch would guarantee order, but then you would not need to use the async API. Just doing:cache.startBatch(); cache.put(k1, v1); // will return immediately, will not wait for RPC cache.put(k2, v2); // will also return immediately cache.endBatch(true); // will push the replication for the above PUTs in a single RPC message
-
2. Re: async API guarantees
sannegrinovero Nov 3, 2009 5:41 AM (in response to sannegrinovero)thanks a lot!
this clarifies the usage and perfectly solves my needs.
I'm going to throw away transactions, as Lucene doesn't have this concept and it was making things unnecessarily complex.