jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asm...@apache.org
Subject cvs commit: jakarta-turbine-jcs/src/test-conf TestRemoval.ccf
Date Thu, 12 May 2005 01:52:41 GMT
asmuts      2005/05/11 18:52:41

  Modified:    src/java/org/apache/jcs/auxiliary/lateral
                        LateralCacheManager.java
               src/java/org/apache/jcs/admin CountingOnlyOutputStream.java
                        CacheElementInfo.java CacheRegionInfo.java
               src/java/org/apache/jcs/auxiliary AuxiliaryCache.java
                        AbstractAuxiliaryCacheAttributes.java
               src/java/org/apache/jcs/access CacheAccess.java
                        GroupCacheAccess.java
               src/java/org/apache/jcs/admin/servlet JCSAdminServlet.java
               src/java/org/apache/jcs/access/behavior
                        IGroupCacheAccess.java ICacheAccess.java
               src/java/org/apache/jcs/access/monitor MonitorAccess.java
  Added:       src/test-conf TestRemoval.ccf
  Log:
  Cleaning house -- javadocs, etc.
  Added missing test config file.
  
  Revision  Changes    Path
  1.13      +24 -24    jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheManager.java
  
  Index: LateralCacheManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LateralCacheManager.java	1 Feb 2005 00:01:58 -0000	1.12
  +++ LateralCacheManager.java	12 May 2005 01:52:41 -0000	1.13
  @@ -129,25 +129,25 @@
   
           if ( log.isDebugEnabled() )
           {
  -            log.debug( "Creating lateral cache service, lca = " + lca );
  +            log.debug( "Creating lateral cache service, lca = " + this.lca );
           }
   
           // need to create the service based on the type
   
           try
           {
  -            if ( lca.getTransmissionType() == ILateralCacheAttributes.TCP )
  +            if ( this.lca.getTransmissionType() == ILateralCacheAttributes.TCP )
               {
                   log.debug( "Creating TCP service" );
  -                log.info( "Creating TCP service, lca = " + lca );
  +                log.info( "Creating TCP service, lca = " + this.lca );
   
  -                this.lateralService = new LateralTCPService( lca );
  +                this.lateralService = new LateralTCPService( this.lca );
               }
  -            else if ( lca.getTransmissionType() == ILateralCacheAttributes.JAVAGROUPS )
  +            else if ( this.lca.getTransmissionType() == ILateralCacheAttributes.JAVAGROUPS
)
               {
                   log.debug( "Creating JAVAGROUPS service" );
   
  -                this.lateralService = new LateralJGService( lca );
  +                this.lateralService = new LateralJGService( this.lca );
               }
   
               else
  @@ -164,8 +164,8 @@
                   throw new Exception( "no service created for lateral cache." );
               }
   
  -            lateralWatch = new LateralCacheWatchRepairable();
  -            lateralWatch.setCacheWatch( new ZombieLateralCacheWatch() );
  +            this.lateralWatch = new LateralCacheWatchRepairable();
  +            this.lateralWatch.setCacheWatch( new ZombieLateralCacheWatch() );
   
           }
           catch ( Exception ex )
  @@ -176,9 +176,9 @@
   
               log.error( "Failure, lateral instance will use zombie service", ex );
   
  -            lateralService = new ZombieLateralCacheService();
  -            lateralWatch = new LateralCacheWatchRepairable();
  -            lateralWatch.setCacheWatch( new ZombieLateralCacheWatch() );
  +            this.lateralService = new ZombieLateralCacheService();
  +            this.lateralWatch = new LateralCacheWatchRepairable();
  +            this.lateralWatch.setCacheWatch( new ZombieLateralCacheWatch() );
   
               // Notify the cache monitor about the error, and kick off
               // the recovery process.
  @@ -198,9 +198,9 @@
       public void addLateralCacheListener( String cacheName, ILateralCacheListener listener
)
           throws IOException
       {
  -        synchronized ( caches )
  +        synchronized ( this.caches )
           {
  -            lateralWatch.addCacheListener( cacheName, listener );
  +            this.lateralWatch.addCacheListener( cacheName, listener );
           }
       }
   
  @@ -215,28 +215,28 @@
       public AuxiliaryCache getCache( String cacheName )
       {
           LateralCacheNoWait c = null;
  -        synchronized ( caches )
  +        synchronized ( this.caches )
           {
               //c = (LateralCache)caches.get(cacheName);
  -            c = ( LateralCacheNoWait ) caches.get( cacheName );
  +            c = ( LateralCacheNoWait ) this.caches.get( cacheName );
               if ( c == null )
               {
  -                c = new LateralCacheNoWait( new LateralCache( lca, lateralService ) );
  -                caches.put( cacheName, c );
  +                c = new LateralCacheNoWait( new LateralCache( this.lca, this.lateralService
) );
  +                this.caches.put( cacheName, c );
   
  -                log.info( "craeted LateralCacheNoWait for " + lca);
  +                log.info( "craeted LateralCacheNoWait for " + this.lca);
               }
           }
   
           try
           {
  -            if ( lca.getTransmissionType() == ILateralCacheAttributes.TCP )
  +            if ( this.lca.getTransmissionType() == ILateralCacheAttributes.TCP )
               {
  -                addLateralCacheListener( cacheName, LateralTCPListener.getInstance( lca
) );
  +                addLateralCacheListener( cacheName, LateralTCPListener.getInstance( this.lca
) );
               }
  -            else if ( lca.getTransmissionType() == ILateralCacheAttributes.JAVAGROUPS )
  +            else if ( this.lca.getTransmissionType() == ILateralCacheAttributes.JAVAGROUPS
)
               {
  -                addLateralCacheListener( cacheName, LateralCacheJGListener.getInstance(
lca ) );
  +                addLateralCacheListener( cacheName, LateralCacheJGListener.getInstance(
this.lca ) );
               }
           }
           catch ( IOException ioe )
  @@ -289,12 +289,12 @@
       {
           log.debug( "Fixing lateral caches:" );
   
  -        synchronized ( caches )
  +        synchronized ( this.caches )
           {
               this.lateralService = lateralService;
               // need to implment an observer for some types of laterals( http and tcp)
               //this.lateralWatch.setCacheWatch(lateralWatch);
  -            for ( Iterator en = caches.values().iterator(); en.hasNext(); )
  +            for ( Iterator en = this.caches.values().iterator(); en.hasNext(); )
               {
                   LateralCacheNoWait cache = ( LateralCacheNoWait ) en.next();
                   cache.fixCache( this.lateralService );
  
  
  
  1.3       +4 -3      jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CountingOnlyOutputStream.java
  
  Index: CountingOnlyOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CountingOnlyOutputStream.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CountingOnlyOutputStream.java	12 Jun 2004 02:34:12 -0000	1.2
  +++ CountingOnlyOutputStream.java	12 May 2005 01:52:41 -0000	1.3
  @@ -30,21 +30,22 @@
   
     public void write( byte[] b ) throws IOException
     {
  -    count += b.length;
  +    this.count += b.length;
     }
   
     public void write( byte[] b, int off, int len ) throws IOException
     {
  -    count += len;
  +    this.count += len;
     }
   
     public void write( int b ) throws IOException
     {
  -    count++;
  +    this.count++;
     }
   
     /**
      * The number of bytes that have passed through this stream.
  +   * @return
      */
     public int getCount()
     {
  
  
  
  1.2       +53 -32    jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CacheElementInfo.java
  
  Index: CacheElementInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CacheElementInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CacheElementInfo.java	9 Jun 2004 04:11:20 -0000	1.1
  +++ CacheElementInfo.java	12 May 2005 01:52:41 -0000	1.2
  @@ -1,4 +1,3 @@
  -
   package org.apache.jcs.admin;
   
   /*
  @@ -17,38 +16,60 @@
    * limitations under the License.
    */
   
  -
   /** Stores info on a cache element for the template */
   public class CacheElementInfo
   {
  -  String key = null;
  -  boolean eternal = false;
  -  String createTime = null;
  -  long maxLifeSeconds = -1;
  -  long expiresInSeconds = -1;
  -
  -  public String getKey()
  -  {
  -    return key;
  -  }
  -
  -  public boolean isEternal()
  -  {
  -    return eternal;
  -  }
  -
  -  public String getCreateTime()
  -  {
  -    return createTime;
  -  }
  -
  -  public long getMaxLifeSeconds()
  -  {
  -    return maxLifeSeconds;
  -  }
  -
  -  public long getExpiresInSeconds()
  -  {
  -    return expiresInSeconds;
  -  }
  +    String key = null;
  +
  +    boolean eternal = false;
  +
  +    String createTime = null;
  +
  +    long maxLifeSeconds = -1;
  +
  +    long expiresInSeconds = -1;
  +
  +    /**
  +     * @return a string representation of the key
  +     */
  +    public String getKey()
  +    {
  +        return this.key;
  +    }
  +
  +    /**
  +     * @return true if the item does not expire
  +     */
  +    public boolean isEternal()
  +    {
  +        return this.eternal;
  +    }
  +
  +    /**
  +     * @return the time the object was created
  +     */
  +    public String getCreateTime()
  +    {
  +        return this.createTime;
  +    }
  +
  +    /**
  +     * Ignored if isEternal
  +     * 
  +     * @return the longest this object can live.
  +     */
  +    public long getMaxLifeSeconds()
  +    {
  +        return this.maxLifeSeconds;
  +    }
  +
  +    /**
  +     * Ignored if isEternal
  +     * 
  +     * @return how many seconds until this object expires.
  +     */
  +    public long getExpiresInSeconds()
  +    {
  +        return this.expiresInSeconds;
  +    }
   }
  
  
  
  1.3       +41 -31    jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CacheRegionInfo.java
  
  Index: CacheRegionInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/admin/CacheRegionInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CacheRegionInfo.java	16 Nov 2004 07:40:42 -0000	1.2
  +++ CacheRegionInfo.java	12 May 2005 01:52:41 -0000	1.3
  @@ -22,37 +22,47 @@
   /** Stores info on a cache region for the template */
   public class CacheRegionInfo
   {
  -  CompositeCache cache = null;
  -  long byteCount = 0;
  +    CompositeCache cache = null;
   
  -  public CompositeCache getCache()
  -  {
  -    return cache;
  -  }
  -
  -  public long getByteCount()
  -  {
  -    return byteCount;
  -  }
  -
  -  public String getStatus()
  -  {
  -    int status = cache.getStatus();
  -
  -    return ( status == CacheConstants.STATUS_ALIVE ? "ALIVE"
  -             : status == CacheConstants.STATUS_DISPOSED ? "DISPOSED"
  -             : status == CacheConstants.STATUS_ERROR ? "ERROR"
  -             : "UNKNOWN" );
  -  }
  -
  -  /**
  -   * Return the stats for the region.
  -   *
  -   * @return String
  -   */
  -  public String getStats()
  -  {
  -    return cache.getStats();
  -  }
  +    long byteCount = 0;
  +
  +    /**
  +     * @return
  +     */
  +    public CompositeCache getCache()
  +    {
  +        return this.cache;
  +    }
  +
  +    /**
  +     * @return
  +     */
  +    public long getByteCount()
  +    {
  +        return this.byteCount;
  +    }
  +
  +    /**
  +     * @return
  +     */
  +    public String getStatus()
  +    {
  +        int status = this.cache.getStatus();
  +
  +        return (status == CacheConstants.STATUS_ALIVE ? "ALIVE"
  +                : status == CacheConstants.STATUS_DISPOSED ? "DISPOSED"
  +                        : status == CacheConstants.STATUS_ERROR ? "ERROR"
  +                                : "UNKNOWN");
  +    }
  +
  +    /**
  +     * Return the stats for the region.
  +     * 
  +     * @return String
  +     */
  +    public String getStats()
  +    {
  +        return this.cache.getStats();
  +    }
   
   }
  
  
  
  1.9       +4 -1      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java
  
  Index: AuxiliaryCache.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AuxiliaryCache.java	6 Jan 2005 01:17:55 -0000	1.8
  +++ AuxiliaryCache.java	12 May 2005 01:52:41 -0000	1.9
  @@ -63,6 +63,9 @@
   
       /**
        * Gets the set of keys of objects currently in the group
  +     * @param group
  +     * @return a set of group keys
  +     * @throws IOException
        */
       public Set getGroupKeys(String group) throws IOException;
       
  
  
  
  1.2       +4 -4      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java
  
  Index: AbstractAuxiliaryCacheAttributes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractAuxiliaryCacheAttributes.java	7 Jan 2005 22:27:14 -0000	1.1
  +++ AbstractAuxiliaryCacheAttributes.java	12 May 2005 01:52:41 -0000	1.2
  @@ -20,7 +20,7 @@
      */
     public void setCacheName( String s )
     {
  -    cacheName = s;
  +    this.cacheName = s;
     }
   
     /* (non-Javadoc)
  @@ -28,7 +28,7 @@
      */
     public String getCacheName()
     {
  -    return cacheName;
  +    return this.cacheName;
     }
   
     /* (non-Javadoc)
  @@ -36,7 +36,7 @@
      */
     public void setName( String s )
     {
  -    name = s;
  +    this.name = s;
     }
   
     /* (non-Javadoc)
  @@ -44,7 +44,7 @@
      */
     public String getName()
     {
  -    return name;
  +    return this.name;
     }
   
     /* (non-Javadoc)
  
  
  
  1.18      +19 -19    jakarta-turbine-jcs/src/java/org/apache/jcs/access/CacheAccess.java
  
  Index: CacheAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/CacheAccess.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CacheAccess.java	27 Jan 2005 22:40:43 -0000	1.17
  +++ CacheAccess.java	12 May 2005 01:52:41 -0000	1.18
  @@ -193,7 +193,7 @@
        */
       public Object get( Object name )
       {
  -        ICacheElement element = cacheControl.get( ( Serializable ) name );
  +        ICacheElement element = this.cacheControl.get( ( Serializable ) name );
   
           return ( element != null ) ? element.getVal() : null;
       }
  @@ -211,7 +211,7 @@
       public void putSafe( Object key, Object value )
           throws CacheException
       {
  -        if ( cacheControl.get( ( Serializable ) key ) != null )
  +        if ( this.cacheControl.get( ( Serializable ) key ) != null )
           {
               throw new ObjectExistsException( "Object exists for key " + key );
           }
  @@ -235,7 +235,7 @@
   
           put( name,
                obj,
  -             cacheControl.getElementAttributes().copy() );
  +             this.cacheControl.getElementAttributes().copy() );
       }
   
       /*
  @@ -259,13 +259,13 @@
   
           try
           {
  -            CacheElement ce = new CacheElement( cacheControl.getCacheName(),
  +            CacheElement ce = new CacheElement( this.cacheControl.getCacheName(),
                                 (Serializable) key,
                                 (Serializable) val );
   
               ce.setElementAttributes( attr );
   
  -            cacheControl.update( ce );
  +            this.cacheControl.update( ce );
           }
           catch ( Exception e )
           {
  @@ -286,7 +286,7 @@
       {
           try
           {
  -            cacheControl.removeAll();
  +            this.cacheControl.removeAll();
           }
           catch ( IOException e )
           {
  @@ -317,7 +317,7 @@
       {
           try
           {
  -            cacheControl.removeAll();
  +            this.cacheControl.removeAll();
           }
           catch ( IOException e )
           {
  @@ -338,7 +338,7 @@
       public void destroy( Object name )
           throws CacheException
       {
  -        cacheControl.remove( ( Serializable ) name );
  +        this.cacheControl.remove( ( Serializable ) name );
       }
   
       /**  
  @@ -350,7 +350,7 @@
       public void remove( Object name )
           throws CacheException
       {
  -        cacheControl.remove( ( Serializable ) name );
  +        this.cacheControl.remove( ( Serializable ) name );
       }
   
       /**
  @@ -359,7 +359,7 @@
        */
       public void save()
       {
  -        cacheControl.save();
  +        this.cacheControl.save();
       }
   
       /**
  @@ -378,7 +378,7 @@
       public void resetElementAttributes( IElementAttributes attr )
           throws CacheException, InvalidHandleException
       {
  -        cacheControl.setElementAttributes( attr );
  +        this.cacheControl.setElementAttributes( attr );
       }
   
       /**
  @@ -393,7 +393,7 @@
       public void resetElementAttributes( Object name, IElementAttributes attr )
           throws CacheException, InvalidHandleException
       {
  -        ICacheElement element = cacheControl.get( ( Serializable ) name );
  +        ICacheElement element = this.cacheControl.get( ( Serializable ) name );
           if ( element == null )
           {
               throw new InvalidHandleException( "Object for name [" + name + "] is not in
the cache" );            
  @@ -415,7 +415,7 @@
       public IElementAttributes getElementAttributes()
           throws CacheException
       {
  -        return cacheControl.attr;
  +        return this.cacheControl.attr;
       }
   
       /**
  @@ -434,7 +434,7 @@
   
           try
           {
  -            attr = cacheControl.getElementAttributes( ( Serializable ) name );
  +            attr = this.cacheControl.getElementAttributes( ( Serializable ) name );
           }
           catch ( IOException ioe )
           {
  @@ -449,7 +449,7 @@
        * @return A String version of the stats.  
        */     
       public String getStats() {
  -      return cacheControl.getStats();
  +      return this.cacheControl.getStats();
       }
   
       /**
  @@ -459,7 +459,7 @@
        */
       public void dispose()
       {
  -        cacheControl.dispose();
  +        this.cacheControl.dispose();
       }
   
       /**
  @@ -470,7 +470,7 @@
        */
       public ICompositeCacheAttributes getCacheAttributes()
       {
  -        return cacheControl.getCacheAttributes();
  +        return this.cacheControl.getCacheAttributes();
       }
   
       /**
  @@ -480,7 +480,7 @@
        */
       public void setCacheAttributes( ICompositeCacheAttributes cattr )
       {
  -        cacheControl.setCacheAttributes( cattr );
  +        this.cacheControl.setCacheAttributes( cattr );
       }
   
   }
  
  
  
  1.16      +5 -5      jakarta-turbine-jcs/src/java/org/apache/jcs/access/GroupCacheAccess.java
  
  Index: GroupCacheAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/GroupCacheAccess.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- GroupCacheAccess.java	27 Jan 2005 22:40:43 -0000	1.15
  +++ GroupCacheAccess.java	12 May 2005 01:52:41 -0000	1.16
  @@ -100,13 +100,13 @@
       public Object getFromGroup( Object name, String group )
       {
           ICacheElement element
  -            = cacheControl.get( getGroupAttrName( group, name ) );
  +            = this.cacheControl.get( getGroupAttrName( group, name ) );
           return ( element != null ) ? element.getVal() : null;
       }
   
       private GroupAttrName getGroupAttrName(String group, Object name)
       {
  -        GroupId gid = new GroupId(cacheControl.getCacheName(), group);
  +        GroupId gid = new GroupId(this.cacheControl.getCacheName(), group);
           return new GroupAttrName(gid, name);
       }
   
  @@ -162,7 +162,7 @@
       public void remove( Object name, String group )
       {
           GroupAttrName key = getGroupAttrName( group, name );
  -        cacheControl.remove( key );
  +        this.cacheControl.remove( key );
       }
   
       /**
  @@ -173,7 +173,7 @@
        */
       public Set getGroupKeys(String group)
       {
  -        return cacheControl.getGroupKeys( group );
  +        return this.cacheControl.getGroupKeys( group );
       }
   
       /** 
  @@ -183,6 +183,6 @@
        */
       public void invalidateGroup( String group )
       {
  -        cacheControl.remove( new GroupId( cacheControl.getCacheName(), group ) );
  +        this.cacheControl.remove( new GroupId( this.cacheControl.getCacheName(), group
) );
       }
   }
  
  
  
  1.12      +1 -4      jakarta-turbine-jcs/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java
  
  Index: JCSAdminServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/admin/servlet/JCSAdminServlet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JCSAdminServlet.java	12 Jun 2004 02:34:12 -0000	1.11
  +++ JCSAdminServlet.java	12 May 2005 01:52:41 -0000	1.12
  @@ -20,7 +20,6 @@
   import javax.servlet.http.HttpServletResponse;
   
   import org.apache.jcs.admin.JCSAdminBean;
  -import org.apache.jcs.engine.control.CompositeCacheManager;
   import org.apache.velocity.Template;
   import org.apache.velocity.context.Context;
   import org.apache.velocity.servlet.VelocityServlet;
  @@ -77,8 +76,6 @@
     private static final String REMOVE_ACTION = "remove";
     private static final String DETAIL_ACTION = "detail";
   
  -  private CompositeCacheManager cacheHub = CompositeCacheManager.getInstance();
  -
     /** @see org.apache.velocity.servlet.VelocityServlet#handleRequest */
     protected Template handleRequest( HttpServletRequest request,
                                       HttpServletResponse response,
  
  
  
  1.6       +33 -5     jakarta-turbine-jcs/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java
  
  Index: IGroupCacheAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IGroupCacheAccess.java	15 Apr 2004 19:22:58 -0000	1.5
  +++ IGroupCacheAccess.java	12 May 2005 01:52:41 -0000	1.6
  @@ -32,29 +32,57 @@
   {
       /**
        * Gets the g attribute of the IGroupCacheAccess object
  -     *
  +     * 
  +     * @param name
  +     * @param group, the name of the group to associate this with.
        * @return The g value
        */
       Object getFromGroup( Object name, String group );
   
   
  -    /** Description of the Method */
  +    /** 
  +     * Puts an item int eh cache associated with this group.
  +     *  
  +     * @param key
  +     * @param group
  +     * @param obj
  +     * @throws CacheException
  +     */
       void putInGroup( Object key, String group, Object obj )
           throws CacheException;
   
   
  -    /** Description of the Method */
  +    /** 
  +     * Put in the cache associated with this group using these attributes.
  +     * 
  +     * @param key
  +     * @param group
  +     * @param obj
  +     * @param attr
  +     * @throws CacheException
  +     */
       void putInGroup( Object key, String group, Object obj, IElementAttributes attr )
           throws CacheException;
   
  -    /** Description of the Method */
  +    /** 
  +     * Remove the item from this group in this region by this name.
  +     *  
  +     * @param name
  +     * @param group
  +     */
       public void remove( Object name, String group );
   
       /**
        * Gets the set of keys of objects currently in the group
  +     * 
  +     * @param group
  +     * @return the set of group keys.
        */
       public Set getGroupKeys(String group);
   
  -    /** Invalidates a group */
  +    /** 
  +     * Invalidates a group 
  +     * @param group
  +     */
       public void invalidateGroup( String group );
   }
  
  
  
  1.5       +48 -20    jakarta-turbine-jcs/src/java/org/apache/jcs/access/behavior/ICacheAccess.java
  
  Index: ICacheAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/behavior/ICacheAccess.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ICacheAccess.java	15 Apr 2004 19:22:58 -0000	1.4
  +++ ICacheAccess.java	12 May 2005 01:52:41 -0000	1.5
  @@ -38,28 +38,46 @@
       //public static CacheAccess getAccess( String region );
   
   
  -    /** Description of the Method */
  +    /** 
  +     * Basic get method.
  +     * 
  +     * @param name
  +     * @return Object or null if not found.
  +     */
       Object get( Object name );
   
   
       /**
        * Puts in cache if an item does not exist with the name in that region.
  +     * @param name
  +     * @param obj
  +     * @throws CacheException
        */
       void putSafe( Object name, Object obj )
           throws CacheException;
   
  -    /** Puts and/or overides an element with the name in that region. */
  +    /** Puts and/or overides an element with the name in that region. 
  +     * @param name
  +     * @param obj
  +     * @throws CacheException
  +     */
       void put( Object name, Object obj )
           throws CacheException;
   
   
  -    /** Description of the Method */
  +    /** Description of the Method 
  +     * @param name
  +     * @param obj
  +     * @param attr
  +     * @throws CacheException
  +     */
       void put( Object name, Object obj, IElementAttributes attr )
           throws CacheException;
   
   
       /**
        * Removes an item or all items. Should be called remove.
  +     * @throws CacheException
        *
        * @deprecated
        * @see #remove
  @@ -67,12 +85,18 @@
       void destroy()
           throws CacheException;
   
  -    /** Description of the Method */
  +    /** 
  +     * Old remove all method.
  +     * 
  +     * @throws CacheException
  +     */
       void remove()
           throws CacheException;
   
       /**
  -     * Description of the Method
  +     * The older removeall method.
  +     * @param name
  +     * @throws CacheException
        *
        * @deprecated
        * @see #remove
  @@ -80,22 +104,15 @@
       void destroy( Object name )
           throws CacheException;
   
  -    /** Description of the Method */
  +    /**
  +     * Remove an object for this key if one exists, else do nothing. 
  +     * 
  +     * @param name
  +     * @throws CacheException
  +     */
       void remove( Object name )
           throws CacheException;
   
  -//    /**
  -//     *  Remove either the entire region of elements or the the specified element
  -//     *  from other caches specified in in the cache.properties file as lateral
  -//     *  caches.
  -//     */
  -//    void removeLateralDirect();
  -//    /**
  -//     *  Description of the Method
  -//     *
  -//     */
  -//    void removeLateralDirect( Serializable key );
  -
       /**
        * ResetAttributes allows for some of the attributes of a region to be reset
        * in particular expiration time attriubtes, time to live, default time to
  @@ -105,12 +122,21 @@
        * default settings on groups and regions will not affect existing objects.
        * Only object loaded after the reset will use the new defaults. If no name
        * argument is provided, the reset is applied to the region.
  +     * 
  +     * @param attr
  +     * @throws CacheException
        */
       void resetElementAttributes( IElementAttributes attr )
           throws CacheException;
   
   
  -    /** Description of the Method */
  +    /**  
  +     * Reset the attributes on the object matching this key name.
  +     * 
  +     * @param name
  +     * @param attr
  +     * @throws CacheException
  +     */
       void resetElementAttributes( Object name, IElementAttributes attr )
           throws CacheException;
   
  @@ -122,6 +148,7 @@
        * object must override the Object.equals and Object.hashCode methods.
        *
        * @return The elementAttributes value
  +     * @throws CacheException
        */
       IElementAttributes getElementAttributes()
           throws CacheException;
  @@ -129,8 +156,10 @@
   
       /**
        * Gets the elementAttributes attribute of the ICacheAccess object
  +     * @param name
        *
        * @return The elementAttributes value
  +     * @throws CacheException
        */
       IElementAttributes getElementAttributes( Object name )
           throws CacheException;
  @@ -151,4 +180,3 @@
       public void setCacheAttributes( ICompositeCacheAttributes cattr );
   
   }
  -// end interface
  
  
  
  1.11      +17 -7     jakarta-turbine-jcs/src/java/org/apache/jcs/access/monitor/MonitorAccess.java
  
  Index: MonitorAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/monitor/MonitorAccess.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MonitorAccess.java	16 Nov 2004 07:40:41 -0000	1.10
  +++ MonitorAccess.java	12 May 2005 01:52:41 -0000	1.11
  @@ -48,14 +48,20 @@
       {
           synchronized ( GroupCacheAccess.class )
           {
  -            if ( cacheMgr == null )
  +            if ( this.cacheMgr == null )
               {
  -                cacheMgr = CompositeCacheManager.getInstance();
  +                this.cacheMgr = CompositeCacheManager.getInstance();
               }
           }
       }
   
  -    /** Description of the Method */
  +    /** 
  +     * Removes all.
  +     *  
  +     * @param cacheName
  +     * @param key
  +     * @return
  +     */
       public String delete( String cacheName, String key )
       {
   
  @@ -65,7 +71,7 @@
           try
           {
   
  -            ICache cache = cacheMgr.getCache( cacheName );
  +            ICache cache = this.cacheMgr.getCache( cacheName );
   
               if ( key != null )
               {
  @@ -114,13 +120,17 @@
           return result;
       }
   
  -    /** Description of the Method */
  +    /** 
  +     * Gives basic info on all the regions.  Better to use getStats.
  +     * 
  +     * @return list of hashtables with keys (name,size,stat)
  +     */
       public ArrayList overview()
       {
   
           ArrayList data = new ArrayList();
   
  -        String[] list = cacheMgr.getCacheNames();
  +        String[] list = this.cacheMgr.getCacheNames();
           Arrays.sort( list );
           for ( int i = 0; i < list.length; i++ )
           {
  @@ -128,7 +138,7 @@
               String name = list[ i ];
               ht.put( "name", name );
   
  -            ICache cache = cacheMgr.getCache( name );
  +            ICache cache = this.cacheMgr.getCache( name );
               int size = cache.getSize();
               ht.put( "size", Integer.toString( size ) );
   
  
  
  
  1.1                  jakarta-turbine-jcs/src/test-conf/TestRemoval.ccf
  
  Index: TestRemoval.ccf
  ===================================================================
  # JCS Config for unit testing, just a simple memory only cache
  
  jcs.default=
  jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
  jcs.default.cacheattributes.MaxObjects=1000
  jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
  
  jcs.system.groupIdCache=
  jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
  jcs.system.groupIdCache.cacheattributes.MaxObjects=10000
  jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
   
  jcs.region.testCache1=
  jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
  jcs.region.testCache1.cacheattributes.MaxObjects=1000
  jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
  
  
  ##############################################################
  ################## THREAD POOL CONFIGURATION ###################
  # Default thread pool config
  thread_pool.default.boundarySize=2000
  thread_pool.default.maximumPoolSize=150
  thread_pool.default.minimumPoolSize=4
  thread_pool.default.keepAliveTime=350000
  #RUN ABORT WAIT BLOCK DISCARDOLDEST
  thread_pool.default.whenBlockedPolicy=RUN
  thread_pool.default.startUpSize=4
  
  # Default Cache Event Queue thread pool config, used by auxiliaries
  thread_pool.cache_event_queue.useBoundary=false
  #thread_pool.cache_event_queue.boundarySize=2000
  #thread_pool.cache_event_queue.maximumPoolSize=10
  thread_pool.cache_event_queue.minimumPoolSize=5
  thread_pool.cache_event_queue.keepAliveTime=3500
  #thread_pool.cache_event_queue.whenBlockedPolicy=RUN
  thread_pool.cache_event_queue.startUpSize=5
  
  # Remote cache client thread pool config
  thread_pool.remote_cache_client.boundarySize=75
  thread_pool.remote_cache_client.maximumPoolSize=150
  thread_pool.remote_cache_client.minimumPoolSize=4
  thread_pool.remote_cache_client.keepAliveTime=350000
  thread_pool.remote_cache_client.whenBlockedPolicy=RUN
  thread_pool.remote_cache_client.startUpSize=4
  
  
  

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


Mime
View raw message