Update of /var/cvs/applications/oscache-cache/src/org/mmbase/cache/oscache
In directory james.mmbase.org:/tmp/cvs-serv10379/src/org/mmbase/cache/oscache

Modified Files:
        OSCacheImplementation.java 
Log Message:
  MMB-1667, changed locking object, and made it explicit


See also: 
http://cvs.mmbase.org/viewcvs/applications/oscache-cache/src/org/mmbase/cache/oscache
See also: http://www.mmbase.org/jira/browse/MMB-1667


Index: OSCacheImplementation.java
===================================================================
RCS file: 
/var/cvs/applications/oscache-cache/src/org/mmbase/cache/oscache/OSCacheImplementation.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- OSCacheImplementation.java  31 Oct 2007 15:56:19 -0000      1.5
+++ OSCacheImplementation.java  24 Jun 2008 10:01:19 -0000      1.6
@@ -33,8 +33,8 @@
  */
 public class OSCacheImplementation<K, V> implements 
CacheImplementationInterface<K, V>  {
     private AbstractConcurrentReadCache cacheImpl;
-    private static final String classname = 
"com.opensymphony.oscache.base.algorithm.LRUCache";
-    private static final String persistanceclass = 
"com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener";
+    private static final String classname = 
com.opensymphony.oscache.base.algorithm.LRUCache.class.getName();
+    private static final String persistanceclass = 
com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener.class.getName();
     private static final Logger log = 
Logging.getLoggerInstance(OSCacheImplementation.class);
 
     public OSCacheImplementation() {
@@ -116,7 +116,7 @@
     /**
      * Wrapper around the entrySet() method of the cache implementation.
      */
-    public Set entrySet() {
+    public Set<Map.Entry<K, V>> entrySet() {
         return cacheImpl.entrySet();
     }
 
@@ -155,7 +155,7 @@
     /**
      * Wrapper around the keySet() method of the cache implementation.
      */
-    public Set keySet() {
+    public Set<K> keySet() {
         return cacheImpl.keySet();
     }
 
@@ -204,7 +204,7 @@
     /**
      * Wrapper around the values() method of the cache implementation.
      */
-    public Collection values() {
+    public Collection<V> values() {
         return cacheImpl.values();
     }
     
@@ -233,4 +233,12 @@
     public int getByteSize(SizeOf sizeof) {
         throw new UnsupportedOperationException("Size is not available for 
OSCache");
     }
+
+    /**
+     * @todo This will also be used to lock 'get' iteration operations in 
QueryResultCache, but that
+     * is not actually needed for this implementation. You cannot synchronize 
on null though, in java.
+     */
+    public Object getLock() {
+        return cacheImpl;
+    }
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to