From turbine-jcs-dev-returnabennett@example.com Fri Mar 04 05:20:56 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 7579 invoked from network); 4 Mar 2005 05:20:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 4 Mar 2005 05:20:56 -0000 Received: (qmail 83856 invoked by uid 500); 4 Mar 2005 05:20:56 -0000 Delivered-To: abennett@example.com Received: (qmail 83833 invoked by uid 500); 4 Mar 2005 05:20:56 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 83818 invoked by uid 500); 4 Mar 2005 05:20:55 -0000 Received: (qmail 83815 invoked by uid 99); 4 Mar 2005 05:20:55 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 03 Mar 2005 21:20:55 -0800 Received: (qmail 7553 invoked by uid 1422); 4 Mar 2005 05:20:54 -0000 Date: 4 Mar 2005 05:20:54 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control CompositeCacheManager.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/03 21:20:54 Modified: src/java/org/apache/jcs/auxiliary/disk/indexed IndexedDiskCacheAttributes.java src/java/org/apache/jcs/engine ElementAttributes.java src/java/org/apache/jcs/engine/control CompositeCacheManager.java Log: Fixed three problems found by Peter Bugla: 1. props file not getting set in manager configure( Properties) 2. getTimeToLiveSeconds was returning millis, but nothing uses this method. 3. The recycle bin size and the max size were dependent on the order in the file. Stopped linking the two. updating to 1.2.5-dev Revision Changes Path 1.14 +13 -20 jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java Index: IndexedDiskCacheAttributes.java =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheAttributes.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- IndexedDiskCacheAttributes.java 1 Feb 2005 00:01:58 -0000 1.13 +++ IndexedDiskCacheAttributes.java 4 Mar 2005 05:20:53 -0000 1.14 @@ -25,18 +25,18 @@ * Configuration class for the Indexed Disk Cache * */ -public class IndexedDiskCacheAttributes extends AbstractDiskCacheAttributes -{ - +public class IndexedDiskCacheAttributes extends AbstractDiskCacheAttributes +{ + private static final int DEFAULT_maxKeySize = 5000; private static final int DEFAULT_maxRecycleBinSize = 5000; - + /** -1 mean no limit. */ private int maxKeySize = DEFAULT_maxKeySize; /** Cannot be larger than the max size. If max is less than 0, this will be 5000 */ private int maxRecycleBinSize = DEFAULT_maxRecycleBinSize; - + // default to -1, i.e., don't optimize until shutdown private int optimizeAtRemoveCount = -1; @@ -45,9 +45,9 @@ */ public IndexedDiskCacheAttributes() { - } + } + - /** * Gets the maxKeySize attribute of the DiskCacheAttributes object * @@ -61,13 +61,13 @@ /** * Sets the maxKeySize attribute of the DiskCacheAttributes object - * + * * @param maxKeySize The new maxKeySize value */ public void setMaxKeySize( int maxKeySize ) { this.maxKeySize = maxKeySize; - + // make sure the sizes are in accord with our rule. setMaxRecycleBinSize( maxRecycleBinSize ); } @@ -100,22 +100,15 @@ * This cannot be larger than the maxKeySize. It wouldn't hurt * anything, but it makes the config necessary. The recycle bin * entry willbe at least as large as a key. - * + * * If the maxKeySize * is -1 this will be set tot he default, which is 5000. - * + * * @param maxRecycleBinSize The maxRecycleBinSize to set. */ public void setMaxRecycleBinSize( int maxRecycleBinSize ) { - if ( maxKeySize >= 0 ) - { - this.maxRecycleBinSize = Math.min( maxRecycleBinSize, maxKeySize ); - } - else - { - this.maxRecycleBinSize = DEFAULT_maxRecycleBinSize; - } + this.maxRecycleBinSize = maxRecycleBinSize; } @@ -127,7 +120,7 @@ return maxRecycleBinSize; } - + /** * Description of the Method * 1.9 +33 -32 jakarta-turbine-jcs/src/java/org/apache/jcs/engine/ElementAttributes.java Index: ElementAttributes.java =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/ElementAttributes.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ElementAttributes.java 1 Feb 2005 00:01:58 -0000 1.8 +++ ElementAttributes.java 4 Mar 2005 05:20:53 -0000 1.9 @@ -31,7 +31,7 @@ /** * Element attribute descriptor class. - * + * * @version $Id: ILateralCacheTCPListener.java,v 1.2 2002/01/18 22:08:26 */ public class ElementAttributes implements IElementAttributes, Serializable, @@ -111,7 +111,7 @@ /** * Constructor for the IElementAttributes object - * + * * @param attr */ private ElementAttributes(ElementAttributes attr) @@ -139,7 +139,7 @@ /** * Copies the attributes, including references to event handlers. - * + * * @return a copy of the Attributes */ public IElementAttributes copy() @@ -167,7 +167,7 @@ /** * Deep clone the attributes. - * + * * @return a clone of these attributes */ public Object clone2() @@ -199,7 +199,7 @@ /** * Sets the version attribute of the IElementAttributes object - * + * * @param version * The new version value */ @@ -210,7 +210,7 @@ /** * Sets the maxLifeSeconds attribute of the IElementAttributes object - * + * * @param mls * The new {3} value */ @@ -221,7 +221,7 @@ /** * Gets the {3} attribute of the ElementAttributes object - * + * * @return The {3} value */ public long getMaxLifeSeconds() @@ -231,7 +231,7 @@ /** * Sets the idleTime attribute of the IElementAttributes object - * + * * @param idle * The new idleTime value */ @@ -244,7 +244,7 @@ /** * Size in bytes. - * + * * @param size * The new size value */ @@ -255,7 +255,7 @@ /** * Gets the size attribute of the IElementAttributes object - * + * * @return The size value */ public int getSize() @@ -265,7 +265,7 @@ /** * Gets the createTime attribute of the IElementAttributes object - * + * * @return The createTime value */ public long getCreateTime() @@ -283,7 +283,7 @@ /** * Gets the version attribute of the IElementAttributes object - * + * * @return The version value */ public long getVersion() @@ -295,7 +295,7 @@ * Gets the idleTime attribute of the IElementAttributes object. Keeping * track of this will require storing the last access time. This could get * expensive. - * + * * @return The idleTime value */ public long getIdleTime() @@ -305,18 +305,19 @@ /** * If the returned value is negative, the item has expired - * + * * @return The timeToLive value */ public long getTimeToLiveSeconds() { long now = System.currentTimeMillis(); - return (this.getCreateTime() + (this.getMaxLifeSeconds() * 1000)) - now; + return ((this.getCreateTime() + (this.getMaxLifeSeconds() + * 1000)) - now) / 1000; } /** * Gets the LastAccess attribute of the IAttributes object - * + * * @return The LastAccess value */ public long getLastAccessTime() @@ -334,7 +335,7 @@ /** * Gets the {3} attribute of the IElementAttributes object - * + * * @return The {3} value */ public boolean getIsDistribute() @@ -344,7 +345,7 @@ /** * Sets the isDistribute attribute of the ElementAttributes object - * + * * @param val * The new isDistribute value */ @@ -355,7 +356,7 @@ /** * can this item be flushed to disk - * + * * @return The {3} value */ public boolean getIsSpool() @@ -365,7 +366,7 @@ /** * Sets the isSpool attribute of the ElementAttributes object - * + * * @param val * The new isSpool value */ @@ -376,7 +377,7 @@ /** * Is this item laterally distributable - * + * * @return The {3} value */ public boolean getIsLateral() @@ -386,7 +387,7 @@ /** * Sets the isLateral attribute of the ElementAttributes object - * + * * @param val * The new isLateral value */ @@ -397,7 +398,7 @@ /** * Can this item be sent to the remote cache - * + * * @return The {3} value */ public boolean getIsRemote() @@ -407,7 +408,7 @@ /** * Sets the isRemote attribute of the ElementAttributes object - * + * * @param val * The new isRemote value */ @@ -418,7 +419,7 @@ /** * can turn off expiration - * + * * @return The {3} value */ public boolean getIsEternal() @@ -428,7 +429,7 @@ /** * Sets the isEternal attribute of the ElementAttributes object - * + * * @param val * The new isEternal value */ @@ -440,11 +441,11 @@ /** * Adds a ElementEventHandler. Handler's can be registered for multiple * events. A registered handler will be called at every recognized event. - * + * * The alternative would be to register handlers for each event. Or maybe * The handler interface should have a method to return whether it cares * about certain events. - * + * * @param eventHandler * The ElementEventHandler to be added to the list. */ @@ -460,7 +461,7 @@ /** * Sets the eventHandlers of the IElementAttributes object - * + * * @param eventHandlers * value */ @@ -480,7 +481,7 @@ /** * Gets the elementEventHandlers. Returns null if none exist. Makes checking * easy. - * + * * @return The elementEventHandlers value */ @@ -491,7 +492,7 @@ /** * For logging and debugging the element IElementAttributes. - * + * * @return String info about the values. */ public String toString() @@ -513,4 +514,4 @@ return dump.toString(); } -} \ No newline at end of file +} 1.13 +2 -0 jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control/CompositeCacheManager.java Index: CompositeCacheManager.java =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control/CompositeCacheManager.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CompositeCacheManager.java 6 Jan 2005 04:44:28 -0000 1.12 +++ CompositeCacheManager.java 4 Mar 2005 05:20:53 -0000 1.13 @@ -210,6 +210,8 @@ new CompositeCacheConfigurator( this ); configurator.doConfigure( props ); + + this.props = props; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From turbine-jcs-dev-returnabennett@example.com Fri Mar 04 06:00:24 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 19411 invoked from network); 4 Mar 2005 06:00:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 4 Mar 2005 06:00:24 -0000 Received: (qmail 20114 invoked by uid 500); 4 Mar 2005 06:00:23 -0000 Delivered-To: abennett@example.com Received: (qmail 20018 invoked by uid 500); 4 Mar 2005 06:00:23 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 20005 invoked by uid 500); 4 Mar 2005 06:00:23 -0000 Received: (qmail 20001 invoked by uid 99); 4 Mar 2005 06:00:23 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 03 Mar 2005 22:00:22 -0800 Received: (qmail 19400 invoked by uid 1422); 4 Mar 2005 06:00:21 -0000 Date: 4 Mar 2005 06:00:21 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/xdocs/images jakarta.png X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/03 22:00:21 Modified: . project.xml xdocs navigation.xml Added: xdocs/images jakarta.png Log: updated web site, removed turbine image. I will put a redirect at the old location. Revision Changes Path 1.49 +3 -3 jakarta-turbine-jcs/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/project.xml,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- project.xml 1 Feb 2005 04:54:25 -0000 1.48 +++ project.xml 4 Mar 2005 06:00:20 -0000 1.49 @@ -3,9 +3,9 @@ <project> <pomVersion>3</pomVersion> - <name>Turbine JCS</name> + <name>JCS</name> <id>jcs</id> - <currentVersion>1.2.4-dev</currentVersion> + <currentVersion>1.2.5-dev</currentVersion> <organization> <name>Apache Software Foundation</name> <url>http://jakarta.apache.org/</url> @@ -13,7 +13,7 @@ </organization> <inceptionYear>2002</inceptionYear> <package>org.apache.jcs</package> - <logo>/images/blue-logo.gif</logo> + <logo></logo> <gumpRepositoryId>jakarta</gumpRepositoryId> 1.7 +0 -7 jakarta-turbine-jcs/xdocs/navigation.xml Index: navigation.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/navigation.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- navigation.xml 28 Jan 2005 04:52:50 -0000 1.6 +++ navigation.xml 4 Mar 2005 06:00:21 -0000 1.7 @@ -2,15 +2,8 @@ <project name="jcs" href="http://jakarta.apache.org/turbine/jcs/"> <title>JCS</title> - <logo href="/images/blue-logo.gif">JCS</logo> <body> - <links> - <item name="Turbine" href="http://jakarta.apache.org/turbine/"/> - <item name="Fulcrum" href="http://jakarta.apache.org/turbine/fulcrum/"/> - <item name="TDK" href="http://jakarta.apache.org/turbine/tdk/"/> - <item name="JCS" href="http://jakarta.apache.org/turbine/jcs/"/> - </links> <menu name="JCS Documentation"> <item name="Overview" href="/index.html"/> 1.1 jakarta-turbine-jcs/xdocs/images/jakarta.png <<Binary file>> --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From turbine-jcs-dev-returnabennett@example.com Fri Mar 04 06:12:02 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 24388 invoked from network); 4 Mar 2005 06:12:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 4 Mar 2005 06:12:02 -0000 Received: (qmail 30928 invoked by uid 500); 4 Mar 2005 06:12:01 -0000 Delivered-To: abennett@example.com Received: (qmail 30906 invoked by uid 500); 4 Mar 2005 06:12:01 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 30891 invoked by uid 500); 4 Mar 2005 06:12:01 -0000 Received: (qmail 30886 invoked by uid 99); 4 Mar 2005 06:12:01 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 03 Mar 2005 22:12:01 -0800 Received: (qmail 24370 invoked by uid 1422); 4 Mar 2005 06:11:59 -0000 Date: 4 Mar 2005 06:11:59 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/tempbuild jcs-1.2.5-dev.jar X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/03 22:11:59 Added: tempbuild jcs-1.2.5-dev.jar Log: Fixed 3 config bugs notice by Bugla. Revision Changes Path 1.1 jakarta-turbine-jcs/tempbuild/jcs-1.2.5-dev.jar <<Binary file>> --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From turbine-jcs-dev-returnabennett@example.com Fri Mar 04 10:07:32 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 42658 invoked from network); 4 Mar 2005 10:07:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 4 Mar 2005 10:07:32 -0000 Received: (qmail 82977 invoked by uid 500); 4 Mar 2005 10:07:19 -0000 Delivered-To: abennett@example.com Received: (qmail 82896 invoked by uid 500); 4 Mar 2005 10:07:18 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 82857 invoked by uid 99); 4 Mar 2005 10:07:18 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail3.metavante.com (HELO p01mail03.metavante.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Mar 2005 02:07:16 -0800 Received: from p51mail02.metavante.com (p51mail02.metavante.com [83.161.120.155]) by p01mail03.metavante.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id j24A73VE021779 for <abennett@example.com>; Fri, 4 Mar 2005 04:07:12 -0600 (CST) Subject: Anand Angadipeta/MKE/METAVANTE is out of the office. From: abennett@example.com To: abennett@example.com Message-ID: <abennett@example.com> Date: Fri, 4 Mar 2005 04:00:05 -0600 X-MIMETrack: Serialize by Router on PXMAIL02/SVR/MICORPEX/US(Release 6.5.3|September 14, 2004) at 03/04/2005 04:07:12 AM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I will be out of the office starting 02/28/2005 and will not return until 03/07/2005. Please contact Cheryl Peroutka for any questions related to SLAPI. Send email to "WebFrame" group if the issue is related to WebFrame framework --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From turbine-jcs-dev-returnabennett@example.com Wed Mar 09 05:37:27 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 69907 invoked from network); 9 Mar 2005 05:37:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Mar 2005 05:37:27 -0000 Received: (qmail 63375 invoked by uid 500); 9 Mar 2005 05:37:27 -0000 Delivered-To: abennett@example.com Received: (qmail 63342 invoked by uid 500); 9 Mar 2005 05:37:26 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 63329 invoked by uid 500); 9 Mar 2005 05:37:26 -0000 Received: (qmail 63322 invoked by uid 99); 9 Mar 2005 05:37:26 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 08 Mar 2005 21:37:24 -0800 Received: (qmail 69883 invoked by uid 1422); 9 Mar 2005 05:37:23 -0000 Date: 9 Mar 2005 05:37:23 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/xdocs Downloads.xml navigation.xml IndexedDiskAuxCache.xml index.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/08 21:37:23 Modified: xdocs navigation.xml IndexedDiskAuxCache.xml index.xml Added: xdocs Downloads.xml Log: Updated docs and site layout. Added a downloads page and fixed a few typos. I'm having some problems with the site gen. The Downloads.html is getting generated with a lowercase d. I had to manually change the name. If I can't figure it out, I'll change the link in the navigation.xml to point to a lowercase d. Revision Changes Path 1.8 +8 -2 jakarta-turbine-jcs/xdocs/navigation.xml Index: navigation.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/navigation.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- navigation.xml 4 Mar 2005 06:00:21 -0000 1.7 +++ navigation.xml 9 Mar 2005 05:37:22 -0000 1.8 @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<project name="jcs" href="http://jakarta.apache.org/turbine/jcs/"> +<project name="jcs" href="http://jakarta.apache.org/jcs/"> <title>JCS</title> <body> - <menu name="JCS Documentation"> + <menu name="General Information"> <item name="Overview" href="/index.html"/> <item name="JCS and JCACHE" href="/JCSandJCACHE.html"/> + <item name="Downloads" href="/Downloads.html"/> + </menu> + + <menu name="JCS User's Guide"> <item name="Basic JCS Config" href="/BasicJCSConfiguration.html"/> <item name="Element Config" href="/ElementAttributes.html"/> <item name="Basic Web Example" href="/UsingJCSBasicWeb.html"/> @@ -17,5 +21,7 @@ <item name="Remote Cache" href="/RemoteAuxCache.html"/> <item name="Lateral TCP Cache" href="/LateralTCPAuxCache.html"/> </menu> + + </body> </project> 1.5 +2 -2 jakarta-turbine-jcs/xdocs/IndexedDiskAuxCache.xml Index: IndexedDiskAuxCache.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/IndexedDiskAuxCache.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- IndexedDiskAuxCache.xml 12 Jan 2005 01:22:35 -0000 1.4 +++ IndexedDiskAuxCache.xml 9 Mar 2005 05:37:22 -0000 1.5 @@ -46,10 +46,10 @@ Writing to the disk cache is asynchronous and made efficient by using a memory staging area called purgatory. Retrievals check purgatory then disk for an item. When items are sent to purgatory they are simultaneously - queued to be put to disk. If an item is retrieved form purgatory it will no + queued to be put to disk. If an item is retrieved from purgatory it will no longer be written to disk, since the cache hub will move it back to memory. Using purgatory insures that there is no wait for disk writes, unecessary - disk writes are avoided for boarderline items, and the items are always + disk writes are avoided for borderline items, and the items are always available. </p> </subsection> 1.4 +2 -2 jakarta-turbine-jcs/xdocs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.xml 28 Jan 2005 04:52:50 -0000 1.3 +++ index.xml 9 Mar 2005 05:37:22 -0000 1.4 @@ -4,7 +4,7 @@ <properties> <title>Java Caching System</title> <author email="abennett@example.com">Pete Kazmier</author> - <author email="abennett@example.com">Aaron Smuts</author> + <author email="abennett@example.com">Aaron Smuts</author> </properties> <body> @@ -17,7 +17,7 @@ JCS is most useful for high read, low put applications. Dynamic content and reporting systems can benefit most. However, any site that repeatedly constructs pages, dropdowns, or common - search results form a database that is updated at intervals + search results from a database that is updated at intervals (rather than across categories continuously) can improve performance and scalability by implementing caching. Latency times drop sharply and bottlenecks move away from the database 1.1 jakarta-turbine-jcs/xdocs/Downloads.xml Index: Downloads.xml =================================================================== <?xml version="1.0"?> <document> <properties> <title>Downloads</title> <author email="abennett@example.com">Aaron Smuts</author> </properties> <body> <section name="Binaries"> <p> We will be offering a release via the standard Jakarta download page very soon. </p> <p> For now, you can find versioned binary releases of JCS in the tempbuild directory of the repository. <a href="http://cvs.apache.org/viewcvs.cgi/jakarta-turbine-jcs/tempbuild/">HERE</a> </p> <p> The core JCS jar is compiled using JDK 1.3. </p> </section> </body> </document> --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From turbine-jcs-dev-returnabennett@example.com Sat Mar 12 05:30:29 2005 Return-Path: <turbine-jcs-dev-returnabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 98367 invoked from network); 12 Mar 2005 05:30:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 12 Mar 2005 05:30:29 -0000 Received: (qmail 4429 invoked by uid 500); 12 Mar 2005 05:30:29 -0000 Delivered-To: abennett@example.com Received: (qmail 4410 invoked by uid 500); 12 Mar 2005 05:30:28 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:abennett@example.com> List-Subscribe: <mailto:abennett@example.com> List-Help: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 4396 invoked by uid 99); 12 Mar 2005 05:30:28 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=URIBL_SBL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from scorpio.lunarpages.com (HELO scorpio.lunarpages.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 11 Mar 2005 21:30:27 -0800 Received: from ip68-4-71-218.oc.oc.cox.net ([83.161.120.155] helo=[83.161.120.155]) by scorpio.lunarpages.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.44) id 1D9zCj-0005p8-TG for abennett@example.com; Fri, 11 Mar 2005 21:30:25 -0800 Mime-Version: 1.0 (Apple Message framework v619.2) Content-Transfer-Encoding: 7bit Message-Id: <abennett@example.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: abennett@example.com From: Roy T. Fielding <abennett@example.com> Subject: moving list to abennett@example.com Date: Fri, 11 Mar 2005 21:30:37 -0800 X-Mailer: Apple Mail (2.619.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scorpio.lunarpages.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gbiv.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am about to move this list up a level to abennett@example.com. All current subscribers will move with it, but you may need to update your incoming folder rules. Please pardon the inconvenience. Cheers, ...Roy T. Fielding, co-founder, The Apache Software Foundation (abennett@example.com) <http://www.apache.org/> (abennett@example.com) <http://roy.gbiv.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Sat Mar 12 05:47:15 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 3633 invoked from network); 12 Mar 2005 05:47:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 12 Mar 2005 05:47:14 -0000 Received: (qmail 15787 invoked by uid 500); 12 Mar 2005 05:47:12 -0000 Delivered-To: abennett@example.com Received: (qmail 15773 invoked by uid 500); 12 Mar 2005 05:47:12 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 15002 invoked by uid 99); 12 Mar 2005 05:47:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from scorpio.lunarpages.com (HELO scorpio.lunarpages.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 11 Mar 2005 21:47:09 -0800 Received: from ip68-4-71-218.oc.oc.cox.net ([83.161.120.155] helo=[83.161.120.155]) by scorpio.lunarpages.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.44) id 1D9zSu-0002Ah-5J for abennett@example.com; Fri, 11 Mar 2005 21:47:08 -0800 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <abennett@example.com> References: <abennett@example.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <abennett@example.com> Content-Transfer-Encoding: 7bit From: Roy T. Fielding <abennett@example.com> Subject: Re: moving list to abennett@example.com Date: Fri, 11 Mar 2005 21:47:19 -0800 To: JCS Developers List <abennett@example.com> X-Mailer: Apple Mail (2.619.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scorpio.lunarpages.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gbiv.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Done ....Roy --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 08:28:59 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 33673 invoked from network); 14 Mar 2005 08:28:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 08:28:59 -0000 Received: (qmail 64609 invoked by uid 500); 14 Mar 2005 08:28:58 -0000 Delivered-To: abennett@example.com Received: (qmail 64510 invoked by uid 500); 14 Mar 2005 08:28:57 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 64495 invoked by uid 500); 14 Mar 2005 08:28:57 -0000 Delivered-To: abennett@example.com Received: (qmail 64492 invoked by uid 500); 14 Mar 2005 08:28:57 -0000 Delivered-To: abennett@example.com Received: (qmail 64486 invoked by uid 99); 14 Mar 2005 08:28:57 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 00:28:57 -0800 Received: (qmail 33641 invoked by uid 1422); 14 Mar 2005 08:28:56 -0000 Date: 14 Mar 2005 08:28:56 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/test/org/apache/jcs/utils - New directory X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/14 00:28:55 jakarta-turbine-jcs/src/test/org/apache/jcs/utils - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 08:29:13 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 33795 invoked from network); 14 Mar 2005 08:29:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 08:29:13 -0000 Received: (qmail 64864 invoked by uid 500); 14 Mar 2005 08:29:12 -0000 Delivered-To: abennett@example.com Received: (qmail 64844 invoked by uid 500); 14 Mar 2005 08:29:12 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 64821 invoked by uid 500); 14 Mar 2005 08:29:12 -0000 Delivered-To: abennett@example.com Received: (qmail 64815 invoked by uid 500); 14 Mar 2005 08:29:12 -0000 Delivered-To: abennett@example.com Received: (qmail 64812 invoked by uid 99); 14 Mar 2005 08:29:12 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 00:29:11 -0800 Received: (qmail 33774 invoked by uid 1422); 14 Mar 2005 08:29:10 -0000 Date: 14 Mar 2005 08:29:10 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/test/org/apache/jcs/utils/struct - New directory X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/14 00:29:10 jakarta-turbine-jcs/src/test/org/apache/jcs/utils/struct - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 08:37:31 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 39339 invoked from network); 14 Mar 2005 08:37:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 08:37:31 -0000 Received: (qmail 73124 invoked by uid 500); 14 Mar 2005 08:37:31 -0000 Delivered-To: abennett@example.com Received: (qmail 73033 invoked by uid 500); 14 Mar 2005 08:37:31 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 73020 invoked by uid 500); 14 Mar 2005 08:37:31 -0000 Delivered-To: abennett@example.com Received: (qmail 73014 invoked by uid 500); 14 Mar 2005 08:37:31 -0000 Delivered-To: abennett@example.com Received: (qmail 73010 invoked by uid 99); 14 Mar 2005 08:37:30 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 00:37:30 -0800 Received: (qmail 39326 invoked by uid 1422); 14 Mar 2005 08:37:29 -0000 Date: 14 Mar 2005 08:37:29 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct SortedPreferentialArray.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/14 00:37:29 Modified: src/java/org/apache/jcs/utils/struct SortedPreferentialArray.java Added: src/test/org/apache/jcs/utils/struct TestSortedPrefArray.java src/test/org/apache/jcs TestRemovalSimple.java TestRemovalConcurrent.java RemovalTestUtil.java Log: Added some simple unit tests. Concurrent and simple removal tests. Sorted Preferential Array tests. Revision Changes Path 1.1 jakarta-turbine-jcs/src/test/org/apache/jcs/utils/struct/TestSortedPrefArray.java Index: TestSortedPrefArray.java =================================================================== package org.apache.jcs.utils.struct; /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import junit.framework.TestCase; /** * Tests the SortedPrefArray used by the recycle bin. * * @author aaronsm * */ public class TestSortedPrefArray extends TestCase { /** * Constructor for the TestSimpleLoad object * * @param testName * Description of the Parameter */ public TestSortedPrefArray( String testName ) { super( testName ); } /** * Description of the Method * * @param args * Description of the Parameter */ public static void main( String args[] ) { String[] testCaseName = { TestSortedPrefArray.class.getName()}; junit.textui.TestRunner.main( testCaseName ); } /** * * * @exception Exception */ public void testLargePref() throws Exception { int maxSize = 25; SortedPreferentialArray array = new SortedPreferentialArray( maxSize ); //array.setPreferLarge( false ); array.setPreferLarge( true ); String[] elem = { "10", "11", "01", "02", "03", "04", "05", "08", "07", "06", "09", "12", "13", "15", "14", "20", "25", "29", "28", "16", "17", "96", "00", "72", "39", "55", "44", "26", "22", "59", "38", "16", "27"}; // put more than the max in a random order for ( int i = 0; i < elem.length; i++ ) { array.add( elem[i] ); System.out.println( array.dumpArray() ); } assertEquals( "Size was not as expected.", maxSize, array.size() ); // this is a fragile test, since it relies on a hardcoded array String smallest = ( String ) array.getSmallest(); assertEquals( "smallest should be 08", "08", smallest ); String largest = ( String ) array.getLargest(); assertEquals( "Largest should be 96", "96", largest ); // this should take 96; String taken = ( String ) array.takeNearestLargerOrEqual( "95" ); assertEquals( "Taken should be 96", "96", taken ); assertEquals( "Size was not as expected.", ( maxSize - 1 ), array.size() ); System.out.println( array.dumpArray() ); } /** * Verify that we don't get an error when taking from an empty array. * * @throws Exception */ public void testEmptyTake() throws Exception { int maxSize = 25; SortedPreferentialArray array = new SortedPreferentialArray( maxSize ); array.setPreferLarge( true ); for ( int i = 0; i < maxSize; i++ ) { String taken = ( String ) array.takeNearestLargerOrEqual( String.valueOf( i ) ); assertNull( "taken should be null, since nothing was in the array", taken ); } } /** * Verify that we don't get a null pointer if we insert a null. * * @throws Exception */ public void testNullInsertion() throws Exception { int maxSize = 25; SortedPreferentialArray array = new SortedPreferentialArray( maxSize ); array.setPreferLarge( true ); String[] elem = { "10", "11", "01", "02", "03", "04", "05", "08", "07", "06", "09", "12", "13", "15", "14", "20", "25", "29", "28", "16", "17", "96", "00", "72", "39", "55", "44", "26", "22", "59", "38", "16", "27"}; // put more than the max in a random order for ( int i = 0; i < elem.length; i++ ) { array.add( elem[i] ); } System.out.println( array.dumpArray() ); assertEquals( "Size was not as expected.", maxSize, array.size() ); try { // should not get an error array.add( null ); } catch ( NullPointerException e ) { fail( "Got a null pointer inserting a null" ); } } /** * Verify that we don't get an npe when taking with a null * * @throws Exception */ public void testNullTake() throws Exception { int maxSize = 25; SortedPreferentialArray array = new SortedPreferentialArray( maxSize ); array.setPreferLarge( true ); try { String taken = ( String ) array.takeNearestLargerOrEqual( null ); assertNull( "taken should be null, since nothing was in the array", taken ); } catch ( NullPointerException e ) { fail( "Got a null pointer trying to take with a null" ); } } } 1.1 jakarta-turbine-jcs/src/test/org/apache/jcs/TestRemovalSimple.java Index: TestRemovalSimple.java =================================================================== package org.apache.jcs; /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import junit.framework.TestCase; /** * Verify that basic removal functionality works. */ public class TestRemovalSimple extends TestCase { /** * Constructor for the TestDiskCache object. * @param testName */ public TestRemovalSimple( String testName ) { super( testName ); } /** * Test setup */ public void setUp() throws Exception { JCS.setConfigFilename( "/TestRemoval.ccf" ); JCS.getInstance( "testCache1" ); } /** * Main method passes this test to the text test runner. * @param args */ public static void main( String args[] ) { String[] testCaseName = { TestRemovalSimple.class.getName()}; junit.textui.TestRunner.main( testCaseName ); } /** * Verify that 2 level deep hierchical removal works. * * @throws Exception */ public void testTwoDeepRemoval() throws Exception { System.out.println( "------------------------------------------" ); System.out.println( "testTwoDeepRemoval" ); int count = 500; JCS jcs = JCS.getInstance( "testCache1" ); for ( int i = 0; i <= count; i++ ) { jcs.put( "key:" + i + ":anotherpart", "data" + i ); } for ( int i = count; i >= 0; i-- ) { String res = ( String ) jcs.get( "key:" + i + ":anotherpart" ); if ( res == null ) { assertNotNull( "[key:" + i + ":anotherpart] should not be null, " + jcs.getStats(), res ); } } System.out.println( "Confirmed that " + count + " items could be found" ); for ( int i = 0; i <= count; i++ ) { jcs.remove( "key:" + i + ":" ); assertNull( jcs.getStats(), jcs.get( "key:" + i + ":anotherpart" ) ); } System.out.println( "Confirmed that " + count + " items were removed" ); System.out.println( jcs.getStats() ); } /** * Verify that 1 level deep hierchical removal works. * * @throws Exception */ public void testSingleDepthRemoval() throws Exception { System.out.println( "------------------------------------------" ); System.out.println( "testSingleDepthRemoval" ); int count = 500; JCS jcs = JCS.getInstance( "testCache1" ); for ( int i = 0; i <= count; i++ ) { jcs.put( i + ":key", "data" + i ); } for ( int i = count; i >= 0; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } System.out.println( "Confirmed that " + count + " items could be found" ); for ( int i = 0; i <= count; i++ ) { jcs.remove( i + ":" ); assertNull( jcs.get( i + ":key" ) ); } System.out.println( "Confirmed that " + count + " items were removed" ); System.out.println( jcs.getStats() ); } /** * Verify that clear removes everyting as it should. * * @throws Exception */ public void testClear() throws Exception { System.out.println( "------------------------------------------" ); System.out.println( "testRemoveAll" ); int count = 500; JCS jcs = JCS.getInstance( "testCache1" ); for ( int i = 0; i <= count; i++ ) { jcs.put( i + ":key", "data" + i ); } for ( int i = count; i >= 0; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } System.out.println( "Confirmed that " + count + " items could be found" ); System.out.println( jcs.getStats() ); jcs.clear(); for ( int i = count; i >= 0; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res != null ) { assertNull( "[" + i + ":key] should be null after remvoeall" + jcs.getStats(), res ); } } System.out.println( "Confirmed that all items were removed" ); } /** * Verify that we can clear repeatedly without error. * * @throws Exception */ public void testClearRepeatedlyWithoutError() throws Exception { System.out.println( "------------------------------------------" ); System.out.println( "testRemoveAll" ); int count = 500; JCS jcs = JCS.getInstance( "testCache1" ); jcs.clear(); for ( int i = 0; i <= count; i++ ) { jcs.put( i + ":key", "data" + i ); } for ( int i = count; i >= 0; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } System.out.println( "Confirmed that " + count + " items could be found" ); System.out.println( jcs.getStats() ); for ( int i = count; i >= 0; i-- ) { jcs.put( i + ":key", "data" + i ); jcs.clear(); String res = ( String ) jcs.get( i + ":key" ); if ( res != null ) { assertNull( "[" + i + ":key] should be null after remvoeall" + jcs.getStats(), res ); } } System.out.println( "Confirmed that all items were removed" ); } } 1.1 jakarta-turbine-jcs/src/test/org/apache/jcs/TestRemovalConcurrent.java Index: TestRemovalConcurrent.java =================================================================== package org.apache.jcs; /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; /** * Test which exercises the hierarchical removal when the cache is active. * */ public class TestRemovalConcurrent extends TestCase { /** * Constructor for the TestDiskCache object. * @param testName */ public TestRemovalConcurrent( String testName ) { super( testName ); } /** * Main method passes this test to the text test runner. * @param args */ public static void main( String args[] ) { String[] testCaseName = { RemovalTestUtil.class.getName()}; junit.textui.TestRunner.main( testCaseName ); } /** * A unit test suite for JUnit. This verfies that we can remove hierarchically * while the region is active. * * @return The test suite */ public static Test suite() { ActiveTestSuite suite = new ActiveTestSuite(); suite.addTest( new RemovalTestUtil( "testRemoveCache1" ) { public void runTest() throws Exception { runTestPutThenRemoveCategorical( 0, 200 ); } } ); suite.addTest( new RemovalTestUtil( "testPutCache1" ) { public void runTest() throws Exception { runPutInRange( 300, 400 ); } } ); suite.addTest( new RemovalTestUtil( "testPutCache2" ) { public void runTest() throws Exception { runPutInRange( 401, 600 ); } } ); // stomp on previous put suite.addTest( new RemovalTestUtil( "testPutCache3" ) { public void runTest() throws Exception { runPutInRange( 401, 600 ); } } ); suite.addTest( new RemovalTestUtil( "testRemoveCache1" ) { public void runTest() throws Exception { runTestPutThenRemoveCategorical( 601, 700 ); } } ); suite.addTest( new RemovalTestUtil( "testRemoveCache1" ) { public void runTest() throws Exception { runTestPutThenRemoveCategorical( 701, 800 ); } } ); suite.addTest( new RemovalTestUtil( "testPutCache2" ) { // verify that there are no errors with concurrent gets. public void runTest() throws Exception { runGetInRange( 0, 1000, false ); } } ); return suite; } /** * Test setup */ public void setUp() throws Exception { JCS.setConfigFilename( "/TestRemoval.ccf" ); JCS.getInstance( "testCache1" ); } } 1.1 jakarta-turbine-jcs/src/test/org/apache/jcs/RemovalTestUtil.java Index: RemovalTestUtil.java =================================================================== package org.apache.jcs; /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import junit.framework.TestCase; /** * Simple methods to be run by active test suites that test removal. * */ public class RemovalTestUtil extends TestCase { /** * Constructor for the TestSimpleLoad object * *@param testName Description of the Parameter */ public RemovalTestUtil( String testName ) { super( testName ); } /** * A unit test for JUnit * *@exception Exception Description of the Exception */ public void runTestPutThenRemoveCategorical( int start, int end ) throws Exception { JCS jcs = JCS.getInstance( "testCache1" ); for ( int i = start; i <= end; i++ ) { jcs.put( i + ":key", "data" + i ); } for ( int i = end; i >= start; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } System.out.println( "Confirmed that " + ( end - start ) + " items could be found" ); for ( int i = start; i <= end; i++ ) { jcs.remove( i + ":" ); assertNull( jcs.get( i + ":key" ) ); } System.out.println( "Confirmed that " + ( end - start ) + " items were removed" ); System.out.println( jcs.getStats() ); } /** * Put items in the cache in this key range. Can be used to verify that * concurrent operations are not effected by things like hierchical removal. * * @param start int * @param end int * @throws Exception */ public void runPutInRange( int start, int end ) throws Exception { JCS jcs = JCS.getInstance( "testCache1" ); for ( int i = start; i <= end; i++ ) { jcs.put( i + ":key", "data" + i ); } for ( int i = end; i >= start; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } } /** * Just get from start to end. * * @param start int * @param end int * @param check boolean -- check to see if the items are in the cache. * @throws Exception */ public void runGetInRange( int start, int end, boolean check ) throws Exception { JCS jcs = JCS.getInstance( "testCache1" ); // don't care if they are found for ( int i = end; i >= start; i-- ) { String res = ( String ) jcs.get( i + ":key" ); if ( check && res == null ) { assertNotNull( "[" + i + ":key] should not be null", res ); } } } } 1.4 +32 -30 jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct/SortedPreferentialArray.java Index: SortedPreferentialArray.java =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct/SortedPreferentialArray.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SortedPreferentialArray.java 1 Feb 2005 04:53:58 -0000 1.3 +++ SortedPreferentialArray.java 14 Mar 2005 08:37:29 -0000 1.4 @@ -64,6 +64,11 @@ */ public void add(Comparable obj) { + if ( obj == null ) + { + return; + } + if (curSize < maxSize) { insert(obj); @@ -108,6 +113,11 @@ } } + /** + * Returns the largest without removing it from the array. + * + * @return Comparable + */ public Comparable getLargest() { int num = curSize - 1; @@ -118,6 +128,11 @@ return array[num]; } + /** + * Returns the smallest element without removing it from the array. + * + * @return Comparable + */ public Comparable getSmallest() { return array[0]; @@ -258,10 +273,15 @@ * Returns and removes the nearer larger or equal object from the aray. * * @param obj Comparable - * @return Comparable + * @return Comparable, null if arg is null or none was found. */ public Comparable takeNearestLargerOrEqual(Comparable obj) { + if ( obj == null ) + { + return null; + } + Comparable retVal = null; try { @@ -294,6 +314,16 @@ } /** + * Returns the current size of the array. + * + * @return int + */ + public int size() + { + return this.curSize; + } + + /** * This determines the position in the array that is occupied by an object * that is larger or equal to the argument. If none exists, -1 is * returned. @@ -551,7 +581,7 @@ /** * Debugging method to return a human readable display of array data. */ - private String dumpArray() + protected String dumpArray() { StringBuffer buf = new StringBuffer(); buf.append("\n ---------------------------"); @@ -566,32 +596,4 @@ return buf.toString(); } - /** - * Simple testing program. - * - * @param args String[] - */ - public static void main(String args[]) - { - - SortedPreferentialArray array = new SortedPreferentialArray(25); - //array.setPreferLarge( false ); - array.setPreferLarge( true ); - String[] elem = - { - "10", "11", "01", "02", "03", "04", "05", "08", "07", - "06", "09", "12", "13", "15", "14", "20", "25", "29", "28", "16", "17", - "96", "00", "72", "39", "55", "44", "26", "22", "59", "38", "16", "27"}; - - for (int i = 0; i < elem.length; i++) - { - array.add(elem[i]); - System.out.println(array.dumpArray()); - } - - //String t = "01"; - //System.out.print(t.compareTo("10")); - - } - } --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 08:37:45 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 39462 invoked from network); 14 Mar 2005 08:37:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 08:37:45 -0000 Received: (qmail 73406 invoked by uid 500); 14 Mar 2005 08:37:45 -0000 Delivered-To: abennett@example.com Received: (qmail 73311 invoked by uid 500); 14 Mar 2005 08:37:44 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 73297 invoked by uid 500); 14 Mar 2005 08:37:44 -0000 Delivered-To: abennett@example.com Received: (qmail 73294 invoked by uid 500); 14 Mar 2005 08:37:44 -0000 Delivered-To: abennett@example.com Received: (qmail 73290 invoked by uid 99); 14 Mar 2005 08:37:44 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 00:37:44 -0800 Received: (qmail 39445 invoked by uid 1422); 14 Mar 2005 08:37:43 -0000 Date: 14 Mar 2005 08:37:43 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs project.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N asmuts 2005/03/14 00:37:43 Modified: . project.xml Log: Added some simple unit tests. Concurrent and simple removal tests. Sorted Preferential Array tests. Revision Changes Path 1.50 +4 -1 jakarta-turbine-jcs/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/project.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- project.xml 4 Mar 2005 06:00:20 -0000 1.49 +++ project.xml 14 Mar 2005 08:37:43 -0000 1.50 @@ -177,9 +177,12 @@ <include>**/TestDiskCacheConcurrent.java</include> <include>**/TestDiskCacheConcurrentForDeadLock.java</include> <include>**/TestTCPLateralCache.java</include> - <include>**/TestJCSvHashtablePerf.java</include> + <include>**/TestJCSvHashtablePerf.java</include> <include>**/TestEventQueueConcurrent.java</include> <include>**/TestSimpleEventHandling.java</include> + <include>**/TestSortedPrefArray.java</include> + <include>**/TestRemovalConcurrent.java</include> + <include>**/TestRemovalSimple.java</include> </includes> <resources> <includes> --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 11:01:53 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 78347 invoked from network); 14 Mar 2005 11:01:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 11:01:53 -0000 Received: (qmail 92611 invoked by uid 500); 14 Mar 2005 11:01:53 -0000 Delivered-To: abennett@example.com Received: (qmail 92514 invoked by uid 500); 14 Mar 2005 11:01:52 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 92499 invoked by uid 500); 14 Mar 2005 11:01:51 -0000 Delivered-To: abennett@example.com Received: (qmail 92494 invoked by uid 500); 14 Mar 2005 11:01:51 -0000 Delivered-To: abennett@example.com Received: (qmail 92489 invoked by uid 99); 14 Mar 2005 11:01:51 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 03:01:51 -0800 Received: (qmail 78291 invoked by uid 1540); 14 Mar 2005 11:01:50 -0000 Date: 14 Mar 2005 11:01:50 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct SortedPreferentialArray.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hchar 2005/03/14 03:01:50 Modified: src/java/org/apache/jcs/utils/struct SortedPreferentialArray.java Log: 1) No need to check for num < 0 in getLargest(), for it would fail anyway had curSize is zero. 2) Throw IndexOutOfBoundException if invalid position passed to remove() 3) simplify + speed up remove() Revision Changes Path 1.5 +10 -22 jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct/SortedPreferentialArray.java Index: SortedPreferentialArray.java =================================================================== RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct/SortedPreferentialArray.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SortedPreferentialArray.java 14 Mar 2005 08:37:29 -0000 1.4 +++ SortedPreferentialArray.java 14 Mar 2005 11:01:50 -0000 1.5 @@ -93,7 +93,6 @@ } } else - if (!preferLarge) { Comparable lar = getLargest(); // insert if obj is smaller than the largest @@ -120,12 +119,7 @@ */ public Comparable getLargest() { - int num = curSize - 1; - if (num < 0) - { - num = 0; - } - return array[num]; + return array[curSize-1]; } /** @@ -558,24 +552,18 @@ * Removes the item from the array at the specified position. The remaining * items to the right are shifted left. * @param position int + * @throw IndexOutOfBoundsException if position is out of range. */ private void remove(int position) { - try - { - // suffle left from removal point - int end = curSize - 1; - for (int i = position; i < end; i++) - { - array[i] = array[i + 1]; - } - curSize--; - } - catch (Exception e) - { - log.error("Remove problem" + this.dumpArray(), e); - } - + if (position >= curSize || position < 0) + throw new IndexOutOfBoundsException("position="+position + + " must be less than curSize="+curSize); + curSize--; + + if (position < curSize) + System.arraycopy(array, position+1, array, position, curSize); + return; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: abennett@example.com For additional commands, e-mail: abennett@example.com From jcs-devabennett@example.com Mon Mar 14 11:28:14 2005 Return-Path: <jcs-devabennett@example.com> Delivered-To: abennett@example.com Received: (qmail 98388 invoked from network); 14 Mar 2005 11:28:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 14 Mar 2005 11:28:14 -0000 Received: (qmail 34503 invoked by uid 500); 14 Mar 2005 11:28:13 -0000 Delivered-To: abennett@example.com Received: (qmail 34479 invoked by uid 500); 14 Mar 2005 11:28:13 -0000 Mailing-List: contact abennett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:abennett@example.com> List-Unsubscribe: <mailto:abennett@example.com> List-Post: <mailto:abennett@example.com> List-Id: <jcs-dev.jakarta.apache.org> Reply-To: "JCS Developers List" <abennett@example.com> Delivered-To: mailing list abennett@example.com Received: (qmail 34465 invoked by uid 500); 14 Mar 2005 11:28:13 -0000 Delivered-To: abennett@example.com Received: (qmail 34462 invoked by uid 500); 14 Mar 2005 11:28:13 -0000 Delivered-To: abennett@example.com Received: (qmail 34459 invoked by uid 99); 14 Mar 2005 11:28:13 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 14 Mar 2005 03:28:12 -0800 Received: (qmail 98369 invoked by uid 1540); 14 Mar 2005 11:28:11 -0000 Date: 14 Mar 2005 11:28:11 -0000 Message-ID: <abennett@example.com> From: abennett@example.com To: abennett@example.com Subject: cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/utils/struct SortedPreferentialArray.java X-Virus-Checked:
{'source': 'Apache Software Foundation Public Mail Archives'}