You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2009/06/25 20:55:44 UTC
svn commit: r788463 -
/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java
Author: asmuts
Date: Thu Jun 25 18:55:44 2009
New Revision: 788463
URL: http://svn.apache.org/viewvc?rev=788463&view=rev
Log:
Catching throwable in shrinker thread, else the process might die.
Modified:
jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java?rev=788463&r1=788462&r2=788463&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java Thu Jun 25 18:55:44 2009
@@ -78,6 +78,21 @@
*/
public void run()
{
+ try
+ {
+ deleteExpiredFromAllRegisteredRegions();
+ }
+ catch ( Throwable e )
+ {
+ log.error( "Caught an expcetion while trying to delete expired items.", e );
+ }
+ }
+
+ /**
+ * Deletes the expired items from all the registered regions.
+ */
+ private void deleteExpiredFromAllRegisteredRegions()
+ {
if ( log.isInfoEnabled() )
{
log.info( "Running JDBC disk cache shrinker. Number of regions [" + shrinkSet.size() + "]" );
@@ -121,7 +136,7 @@
}
catch ( InterruptedException e )
{
- log.warn( "Interrupted while waiting to delete expired for the enxt region." );
+ log.warn( "Interrupted while waiting to delete expired for the next region." );
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org