You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by dl...@apache.org on 2002/02/12 20:08:06 UTC

cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/resource ResourceCacheImpl.java

dlr         02/02/12 11:08:06

  Modified:    src/java/org/apache/velocity/runtime/resource
                        ResourceCacheImpl.java
  Log:
  Made sub-classing easier:
  
  o Changed type of the "cache" instance field from Hashtable to Map.
  
  o Widened visibility of the "cache" and "rsvc" fields from private to
  protected.
  
  Revision  Changes    Path
  1.2       +14 -4     jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceCacheImpl.java
  
  Index: ResourceCacheImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/resource/ResourceCacheImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- ResourceCacheImpl.java	6 Nov 2001 03:20:07 -0000	1.1
  +++ ResourceCacheImpl.java	12 Feb 2002 19:08:06 -0000	1.2
  @@ -55,6 +55,7 @@
    */
   
   import java.util.Hashtable;
  +import java.util.Map;
   import java.util.Iterator;
   import org.apache.velocity.runtime.RuntimeServices;
   
  @@ -63,12 +64,21 @@
    * ResourceManager.
    *
    * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
  - * @version $Id: ResourceCacheImpl.java,v 1.1 2001/11/06 03:20:07 geirm Exp $
  + * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
  + * @version $Id: ResourceCacheImpl.java,v 1.2 2002/02/12 19:08:06 dlr Exp $
    */
   public class ResourceCacheImpl implements ResourceCache
   {
  -    private Hashtable cache = new Hashtable();
  -    private RuntimeServices rsvc = null;
  +    /**
  +     * Cache storage, assumed to be thread-safe.
  +     */
  +    protected Map cache = new Hashtable();
  +
  +    /**
  +     * Runtime services, generally initialized by the
  +     * <code>initialize()</code> method.
  +     */
  +    protected RuntimeServices rsvc = null;
       
       public void initialize( RuntimeServices rs )
       {
  @@ -96,4 +106,4 @@
       {
           return cache.keySet().iterator();
       }
  -}
  \ No newline at end of file
  +}
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>