froehlich 02/01/20 06:00:43
Modified: simplestore/src/java/org/apache/commons/simplestore
MRUMemoryStore.java
Log:
added new constructor. his parameter defines now maxobject!
Revision Changes Path
1.11 +4 -14
jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/MRUMemoryStore.java
Index: MRUMemoryStore.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/MRUMemoryStore.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- MRUMemoryStore.java 20 Jan 2002 12:24:40 -0000 1.10
+++ MRUMemoryStore.java 20 Jan 2002 14:00:43 -0000 1.11
@@ -22,7 +22,7 @@
*
* @author Gerhard Froehlich <a href="mailto:[EMAIL PROTECTED]">
* [EMAIL PROTECTED]</a>
- * @version $Id: MRUMemoryStore.java,v 1.10 2002/01/20 12:24:40 froehlich Exp $
+ * @version $Id: MRUMemoryStore.java,v 1.11 2002/01/20 14:00:43 froehlich Exp $
*/
public final class MRUMemoryStore
implements Store {
@@ -33,17 +33,6 @@
private StoreJanitor mStorejanitor;
/**
- * This method sets the number of objects the Store is
- * allowed to hold. Default is 100 objects.
- *
- * @param maxobjects number of objects which are allowed
- * to be stored.
- */
- public void setMaxObjects(int maxobjects) {
- this.mMaxObjects = maxobjects;
- }
-
- /**
* This method returns the current set of the object limit.
*
* @return value of the object limit.
@@ -57,9 +46,10 @@
* first call the setMaxObjects(int maxobjects) method to set the
* the limit of the Store. Default the limit is 100 Objects.
*/
- public void initialize() {
- this.mCache = new Hashtable((int) (this.getMaxObjects() * 1.2));
+ public MRUMemoryStore(int maxobjects) {
+ this.mCache = new Hashtable((int) (maxobjects * 1.2));
this.mMRUList = new LinkedList();
+ this.mMaxObjects = maxobjects;
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>