[infinispan-dev] Attention CacheStore authors
Manik Surtani
manik at jboss.org
Wed Mar 10 12:49:37 EST 2010
Hi all.
I recently committed ISPN-311 [1] and ISPN-310 [2]. This affects anyone implementing CacheLoader [3], as it adds 2 new methods to the interface [4]. The Javadocs on these methods should explain how they should be implemented and the JIRAs explain why.
I have updated all implementations in Infinispan trunk accordingly, this email is really more of a heads-up to folks implementing their own cache loader/stores.
The LockSupportCacheStore - an abstract building-block for certain cache stores - has also been updated to implement these methods, and to expose protected loadLockSafe(int) and loadAllKeysLockSafe(Set) methods [5].
I have also made a change to the BucketBasedCacheStore [6] - another abstract building-block. The key difference here is that certain methods - loadAllLockSafe(), as well as the new loadLockSafe(int) and loadAllKeysLockSafe(Set) - are implemented [7]. This means that concrete implementations do not need to implement these methods. All they do need to implement, now, is the new, abstract loopOverBuckets() method in BucketBasedCacheStore. See the changes in FileCacheStore as an example [8].
Enjoy,
Manik
[1] https://jira.jboss.org/jira/browse/ISPN-311
[2] https://jira.jboss.org/jira/browse/ISPN-310
[3] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/CacheLoader.java?r=1589
[4] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/CacheLoader.java?r1=1578&r2=1589&u=3&ignore=&k=
[5] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/LockSupportCacheStore.java?r1=1550&r2=1589&u=3&ignore=&k=
[6] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/bucket/BucketBasedCacheStore.java?r=1589
[7] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/bucket/BucketBasedCacheStore.java?r1=1589&r2=1583
[8] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/loaders/file/FileCacheStore.java?r1=1583&r2=1589&u=3&ignore=&k=
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
More information about the infinispan-dev
mailing list