Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-13 Thread Antonio Gallardo

Joerg Heinicke wrote:


On 11.11.2005 18:57, Arje Cahn wrote:


2 small points:

A. Use 2004-2005 instead
B. Patch also 2.1.8. ;-)




Thanks, Antonio, I will fix this!



Code freeze?


Right, but it is a bug fixing issue:

EHDefaultStore initializes the cache to never expire entries. This 
means that the cache will grow indefinitely (on disk).


Please allow to include this in the 2.1.8. This will avoid mails 
pointing out this isssue after releasing 2.1.8. ;-)


WDYT?

Best Regads,

Antonio Gallardo.



Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-13 Thread Joerg Heinicke

On 14.11.2005 00:04, Antonio Gallardo wrote:


Code freeze?


Right, but it is a bug fixing issue:

EHDefaultStore initializes the cache to never expire entries. This 
means that the cache will grow indefinitely (on disk).


Please allow to include this in the 2.1.8. This will avoid mails 
pointing out this isssue after releasing 2.1.8. ;-)


If it is a bug fix it may of course go into the codebase. I thought it 
was just an enhancement.


Jörg


Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-13 Thread Antonio Gallardo

Joerg Heinicke wrote:


On 14.11.2005 00:04, Antonio Gallardo wrote:


Code freeze?



Right, but it is a bug fixing issue:

EHDefaultStore initializes the cache to never expire entries. This 
means that the cache will grow indefinitely (on disk).


Please allow to include this in the 2.1.8. This will avoid mails 
pointing out this isssue after releasing 2.1.8. ;-)



If it is a bug fix it may of course go into the codebase. I thought it 
was just an enhancement.


Thanks Jörg. :-)

Arje, Jörg gave us green light, feel free to commit it to 2.1.8. Thanks. :-D

Best Regards,

Antonio Gallardo.



Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-13 Thread David Crossley
Antonio Gallardo wrote:
 Author: arje
 Date: Fri Nov 11 09:17:23 2005
 New Revision: 332608
 
 URL: http://svn.apache.org/viewcvs?rev=332608view=rev
 Log:
 Applied patch for issue 1683: Allow configuration of expiry in 
 EHDefaultStore
 http://issues.apache.org/jira/browse/COCOON-1683
 + Changed the copyright notice to 2004, 2005
 Please let me know if I did it wrong 8-%
  
 Do you doing very well! :-)
 
 2 small points:
 
 A. Use 2004-2005 instead
 B. Patch also 2.1.8. ;-)

Mentioning the issue number is great: COCOON-1683
That lets Jira create links to SVN commit logs.

You should also mention
Contributed by: Johan Stuyts

The other way that we give recognition is to add
an entry to the status.xml files in trunk and branch.
See the fix-for and due-to attributes. This generates
the Changes notes.

-David


Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-13 Thread Antonio Gallardo

David Crossley wrote:


Antonio Gallardo wrote:
 


Author: arje
Date: Fri Nov 11 09:17:23 2005
New Revision: 332608

URL: http://svn.apache.org/viewcvs?rev=332608view=rev
Log:
Applied patch for issue 1683: Allow configuration of expiry in 
EHDefaultStore

http://issues.apache.org/jira/browse/COCOON-1683
+ Changed the copyright notice to 2004, 2005
Please let me know if I did it wrong 8-%

 


Do you doing very well! :-)

2 small points:

A. Use 2004-2005 instead
B. Patch also 2.1.8. ;-)
   



Mentioning the issue number is great: COCOON-1683
That lets Jira create links to SVN commit logs.

You should also mention
Contributed by: Johan Stuyts

The other way that we give recognition is to add
an entry to the status.xml files in trunk and branch.
See the fix-for and due-to attributes. This generates
the Changes notes.
 


Yep. As a sample to see the auto SVN integration:

http://issues.apache.org/jira/browse/COCOON-1365?page=all

Best Regards,

Antonio Gallardo.



Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-11 Thread Antonio Gallardo

[EMAIL PROTECTED] wrote:


Author: arje
Date: Fri Nov 11 09:17:23 2005
New Revision: 332608

URL: http://svn.apache.org/viewcvs?rev=332608view=rev
Log:
Applied patch for issue 1683: Allow configuration of expiry in EHDefaultStore
http://issues.apache.org/jira/browse/COCOON-1683
+ Changed the copyright notice to 2004, 2005
Please let me know if I did it wrong 8-%
 


Do you doing very well! :-)

2 small points:

A. Use 2004-2005 instead
B. Patch also 2.1.8. ;-)

Best Regards,

Antonio Gallardo.


Modified:
   
cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

Modified: 
cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java?rev=332608r1=332607r2=332608view=diff
==
--- 
cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java
 (original)
+++ 
cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java
 Fri Nov 11 09:17:23 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004,2004 The Apache Software Foundation.
+ * Copyright 2004, 2005 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.
@@ -70,6 +70,9 @@
// configuration options
private int maxObjects;
private boolean overflowToDisk;
+private boolean eternal;
+private long timeToLiveSeconds;
+private long timeToIdleSeconds;

/** The service manager */
private ServiceManager manager;
@@ -109,6 +112,15 @@
 *  licodemaxobjects/code (1) - The maximum number of in-memory 
objects./li
 *  licodeoverflow-to-disk/code (true) - Whether to spool elements to 
disk after
 *   maxobjects has been exceeded./li
+ * licodeeternal/code (true) - whether or not entries expire. When 
set to
+ * codefalse/code the codetimeToLiveSeconds/code and
+ * codetimeToIdleSeconds/code parameters are used to determine when an
+ * item expires./li
+ * licodetimeToLiveSeconds/code (0) - how long an entry may live in 
the cache
+ * before it is removed. The entry will be removed no matter how frequently it 
is retrieved./li
+ * licodetimeToIdleSeconds/code (0) - the maximum time between 
retrievals
+ * of an entry. If the entry is not retrieved for this period, it is 
removed from the
+ * cache./li
 *  licodeuse-cache-directory/code (false) - If true the 
icache-directory/i
 *   context entry will be used as the location of the disk store. 
 *   Within the servlet environment this is set in web.xml./li

@@ -117,11 +129,50 @@
 *   Within the servlet environment this is set in web.xml./li
 *  licodedirectory/code - Specify an alternative location of the 
disk store.
 * /ul
+ * 
+ * p

+ * Setting codeeternal/code to codefalse/code but not setting
+ * codetimeToLiveSeconds/code and/or codetimeToIdleSeconds/code, 
has the
+ * same effect as setting codeeternal/code to codetrue/code.
+ * /p
+ * 
+ * p

+ * Here is an example to clarify the purpose of the 
codetimeToLiveSeconds/code and
+ * codetimeToIdleSeconds/code parameters:
+ * /p
+ * ul
+ *   litimeToLiveSeconds = 86400 (1 day)/li
+ *   litimeToIdleSeconds = 10800 (3 hours)/li
+ * /ul
+ * 
+ * p

+ * With these settings the entry will be removed from the cache after 24 
hours. If within
+ * that 24-hour period the entry is not retrieved within 3 hours after the 
last retrieval, it will
+ * also be removed from the cache.
+ * /p
+ * 
+ * p

+ * By setting codetimeToLiveSeconds/code to code0/code, an item 
can stay in
+ * the cache as long as it is retrieved within 
codetimeToIdleSeconds/code after the
+ * last retrieval.
+ * /p
+ * 
+ * p

+ * By setting codetimeToIdleSeconds/code to code0/code, an item 
will stay in
+ * the cache for exactly codetimeToLiveSeconds/code.
+ * /p
 */
public void parameterize(Parameters parameters) throws ParameterException {

this.maxObjects = parameters.getParameterAsInteger(maxobjects, 1);
this.overflowToDisk = 
parameters.getParameterAsBoolean(overflow-to-disk, true);
+
+this.eternal = parameters.getParameterAsBoolean(eternal, true);

+if (!this.eternal)
+{
+this.timeToLiveSeconds = 
parameters.getParameterAsLong(timeToLiveSeconds, 0L);
+this.timeToIdleSeconds = 
parameters.getParameterAsLong(timeToIdleSeconds, 0L);
+}

try {
if (parameters.getParameterAsBoolean(use-cache-directory, false)) 
{
@@ -211,7 +262,8 @@
public void initialize() throws Exception {
URL configFileURL = 
Thread.currentThread().getContextClassLoader().getResource(CONFIG_FILE);
   

RE: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-11 Thread Arje Cahn
 2 small points:
 
 A. Use 2004-2005 instead
 B. Patch also 2.1.8. ;-)

Thanks, Antonio, I will fix this!

Arje


Re: svn commit: r332608 - /cocoon/trunk/src/java/org/apache/cocoon/components/store/impl/EHDefaultStore.java

2005-11-11 Thread Joerg Heinicke

On 11.11.2005 18:57, Arje Cahn wrote:

2 small points:

A. Use 2004-2005 instead
B. Patch also 2.1.8. ;-)



Thanks, Antonio, I will fix this!


Code freeze?

Jörg