User: user57
Date: 02/02/16 03:39:55
Modified: src/main/org/jboss/util CachePolicy.java
Log:
o reformat
Revision Changes Path
1.7 +58 -52 jboss/src/main/org/jboss/util/CachePolicy.java
Index: CachePolicy.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/CachePolicy.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CachePolicy.java 31 Jan 2002 00:05:02 -0000 1.6
+++ CachePolicy.java 16 Feb 2002 11:39:55 -0000 1.7
@@ -4,69 +4,75 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
+
package org.jboss.util;
import org.jboss.system.Service;
+
/**
* Interface that specifies a policy for caches. <p>
* Implementation classes can implement a LRU policy, a random one,
* a MRU one, or any other suitable policy.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Simone Bordet</a>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
-public interface CachePolicy extends Service
+public interface CachePolicy
+ extends Service
{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
+ /**
+ * Returns the object paired with the specified key if it's
+ * present in the cache, otherwise must return null. <br>
+ * Implementations of this method must have complexity of order O(1).
+ * Differently from {@link #peek} this method not only return whether
+ * the object is present in the cache or not, but also
+ * applies the implemented policy that will "refresh" the cached
+ * object in the cache, because this cached object
+ * was really requested.
+ *
+ * @param key the key paired with the object
+ * @see #peek
+ */
+ Object get(Object key);
- // Public --------------------------------------------------------
- /**
- * Returns the object paired with the specified key if it's
- * present in the cache, otherwise must return null. <br>
- * Implementations of this method must have complexity of order O(1).
- * Differently from {@link #peek} this method not only return whether
- * the object is present in the cache or not, but also
- * applies the implemented policy that will "refresh" the cached
- * object in the cache, because this cached object
- * was really requested.
- * @param key the key paired with the object
- * @see #peek
- */
- public Object get(Object key);
- /**
- * Returns the object paired with the specified key if it's
- * present in the cache, otherwise must return null. <br>
- * Implementations of this method must have complexity of order O(1).
- * This method should not apply the implemented caching policy to the
- * object paired with the given key, so that a client can
- * query if an object is cached without "refresh" its cache status. Real
- * requests for the object must be done using {@link #get}.
- * @param key the key paired with the object
- * @see #get
- */
- public Object peek(Object key);
- /**
- * Inserts the specified object into the cache following the
- * implemented policy. <br>
- * Implementations of this method must have complexity of order O(1).
- * @param key the key paired with the object
- * @param object the object to cache
- * @see #remove
- */
- public void insert(Object key, Object object);
- /**
- * Remove the cached object paired with the specified key. <br>
- * Implementations of this method must have complexity of order O(1).
- * @param key the key paired with the object
- * @see #insert
- */
- public void remove(Object key);
- /**
- * Flushes the cached objects from the cache.
- */
- public void flush();
+ /**
+ * Returns the object paired with the specified key if it's
+ * present in the cache, otherwise must return null. <br>
+ * Implementations of this method must have complexity of order O(1).
+ * This method should not apply the implemented caching policy to the
+ * object paired with the given key, so that a client can
+ * query if an object is cached without "refresh" its cache status. Real
+ * requests for the object must be done using {@link #get}.
+ *
+ * @param key the key paired with the object
+ * @see #get
+ */
+ Object peek(Object key);
+
+ /**
+ * Inserts the specified object into the cache following the
+ * implemented policy. <br>
+ * Implementations of this method must have complexity of order O(1).
+ *
+ * @param key the key paired with the object
+ * @param object the object to cache
+ * @see #remove
+ */
+ void insert(Object key, Object object);
+
+ /**
+ * Remove the cached object paired with the specified key. <br>
+ * Implementations of this method must have complexity of order O(1).
+ *
+ * @param key the key paired with the object
+ * @see #insert
+ */
+ void remove(Object key);
+
+ /**
+ * Flushes the cached objects from the cache.
+ */
+ void flush();
- public int size();
+ int size();
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development