asmuts 02/05/14 08:20:43
Modified: src/java/org/apache/jcs/engine CacheEventQueue.java
Log:
This had an awful bug. All the events were getting sent into the Q and getting
nullified.
The only reason the disk cache seemed to work was because of the purgatory.
This is one of the most central classes in the entire system. It has been messed
with a lot because it used to use JGL stuff.
It should be fixed now.
I tried to copy the Q to use for element events and found that the new
implementation didn't work.
I guess this does everything the old Q used to do. I'm not sure.
None of the auxiliaries could have worked properly since this was changed.
The take method was returning null always.
Revision Changes Path
1.3 +18 -1
jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CacheEventQueue.java
Index: CacheEventQueue.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CacheEventQueue.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CacheEventQueue.java 12 Apr 2002 01:39:57 -0000 1.2
+++ CacheEventQueue.java 14 May 2002 15:20:43 -0000 1.3
@@ -224,7 +224,18 @@
Node node = head.next;
- AbstractCacheEvent value = head.event;
+ // This is an awful bug. This will always return null.
+ // This make the event Q and event destroyer.
+ //AbstractCacheEvent value = head.event;
+
+ // corrected
+ AbstractCacheEvent value = node.event;
+
+ if ( log.isDebugEnabled() )
+ {
+ log.debug( "head.event = " + head.event );
+ log.debug( "node.event = " + node.event );
+ }
// Node becomes the new head (head is always empty)
@@ -271,6 +282,12 @@
try
{
r = take();
+
+ if ( log.isDebugEnabled() )
+ {
+ log.debug( "r from take() = " + r );
+ }
+
}
catch ( InterruptedException e )
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>