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 2003/11/17 22:49:28 UTC

cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control CompositeCache.java

asmuts      2003/11/17 13:49:28

  Modified:    src/java/org/apache/jcs/engine/control CompositeCache.java
  Log:
  Made element event queue static so all regions can share it.  May want to create it as used per region instead.  For now this will solve the extra thread problem.  Each region was creating a queue before which ran as a separate thread.
  
  Revision  Changes    Path
  1.10      +8 -8      jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control/CompositeCache.java
  
  Index: CompositeCache.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/control/CompositeCache.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CompositeCache.java	6 Nov 2003 17:58:51 -0000	1.9
  +++ CompositeCache.java	17 Nov 2003 21:49:28 -0000	1.10
  @@ -100,6 +100,13 @@
   {
       private final static Log log = LogFactory.getLog( CompositeCache.class );
   
  +    /**
  +     *  EventQueue for handling element events.
  +     *  1 should be enough for all the regions. Else should create as needed
  +     *  per region.
  +     */
  +    public static IElementEventQueue elementEventQ = new ElementEventQueue( "AllRegionQueue" );
  +
       // Auxiliary caches.
       private AuxiliaryCache[] auxCaches;
   
  @@ -118,11 +125,6 @@
        */
       public ICompositeCacheAttributes cacheAttr;
   
  -    /**
  -     *  Cache Attributes, for hub and memory auxiliary
  -     */
  -    public IElementEventQueue elementEventQ;
  -
       // Statistics
   
       /** Memory cache hit count */
  @@ -163,8 +165,6 @@
   
           this.attr = attr;
           this.cacheAttr = cattr;
  -
  -        elementEventQ = new ElementEventQueue( cacheName );
   
           createMemoryCache( cattr );
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org