Le 3 déc. 2009 à 18:59, Manik Surtani a écrit :
On 2 Dec 2009, at 18:00, philippe van dyck wrote:
> The CacheStore interface does not offer an asynchronous solution, but a workaround is
available.
>
The CacheStore interface itself does not, but we do support async storing (write-behind).
In your config, just add the <async enabled="true" /> in your <loader
... /> element.
Thanks Manik, here is a copy of my previous answer regarding this exact topic:
"
This asynchronism is happening on another layer, and it is not helping.
Right now, the cache access is synchronous (org.infinispan.Cache extends ConcurrentMap)
If you enable it, the cache updates are delegated to an asynch store decorator, queuing
updates for periodic flushing.
When this decorator flushes updates to the actual cache store, they are currently flushed
in a batch (transaction like).
This batch is then sent to the cache store... and emptied synchronously.
If you want to implement an asynchronous interface, you have to implement it through all
the layers or it will be "resynchronized".
The cache store interface does not offer an asynchronous (Future<>) interface...
IMHO, if you want to allow asynchronous access, you have to begin down there, and push it
up to the AdvancedCache interface.
The real added value of a completely asynchronous system is to apply it on the system
level, like the HTTP NIO libraries or a Multithreaded layer (OS level like Grand Central /
OpenCL).
phil
"
Cheers
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev