colus       02/04/04 02:53:00

  Modified:    cache/src/java/org/apache/avalon/excalibur/cache
                        CacheEvent.java ValidatingCache.java
               cache/src/java/org/apache/avalon/excalibur/cache/store
                        FlipSpacesStore.java
  Log:
  Javadoc updates.
  
  Revision  Changes    Path
  1.5       +17 -0     
jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/CacheEvent.java
  
  Index: CacheEvent.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/CacheEvent.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CacheEvent.java   11 Dec 2001 09:53:33 -0000      1.4
  +++ CacheEvent.java   4 Apr 2002 10:53:00 -0000       1.5
  @@ -20,6 +20,13 @@
       private Object m_key;
       private Object m_value;
   
  +    /**
  +     * Construct the <code>CacheEvent</code>.
  +     *
  +     * @param cache the source of event
  +     * @param key the key
  +     * @param value the value
  +     */
       public CacheEvent( final Cache cache,
                          final Object key, final Object value )
       {
  @@ -28,11 +35,21 @@
           m_value = value;
       }
   
  +    /**
  +     * Retrieve the key.
  +     *
  +     * @return the key
  +     */
       public Object getKey()
       {
           return m_key;
       }
   
  +    /**
  +     * Retrieve the value.
  +     *
  +     * @return the value
  +     */
       public Object getValue()
       {
           return m_value;
  
  
  
  1.6       +9 -0      
jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/ValidatingCache.java
  
  Index: ValidatingCache.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/ValidatingCache.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ValidatingCache.java      30 Mar 2002 07:24:19 -0000      1.5
  +++ ValidatingCache.java      4 Apr 2002 10:53:00 -0000       1.6
  @@ -20,6 +20,8 @@
       private CacheValidator m_validator;
   
       /**
  +     * Cache with validator.
  +     *
        * @param cache
        * @param validator object validator
        */
  @@ -29,6 +31,13 @@
           m_validator = validator;
       }
   
  +    /**
  +     * Validate cached item.
  +     *
  +     * @param key the key of cached item
  +     * @param value the value of cached item
  +     * @return true if cached item is valid otherwise false
  +     */
       private boolean validate( final Object key, final Object value )
       {
           if( null == m_validator )
  
  
  
  1.4       +20 -13    
jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/store/FlipSpacesStore.java
  
  Index: FlipSpacesStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/cache/src/java/org/apache/avalon/excalibur/cache/store/FlipSpacesStore.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FlipSpacesStore.java      27 Mar 2002 14:35:11 -0000      1.3
  +++ FlipSpacesStore.java      4 Apr 2002 10:53:00 -0000       1.4
  @@ -24,8 +24,9 @@
       private Map m_newCache = null;
   
       /**
  -     * the data space which stores accessed items which have not been 
accessed since the last space swap.
  -     * At the time <code>copySpaces</code> is called, objects still stored 
within this space are removed from the cache.
  +     * the data space which stores accessed items which have not been 
accessed
  +     * since the last space swap. At the time <code>copySpaces</code> is 
called,
  +     * objects still stored within this space are removed from the cache.
        */
       private Map m_oldCache = null;
   
  @@ -53,8 +54,9 @@
   
       /**
        * Puts a given name value pair into the newCache.
  -     * By invoking a get for the Object associated with the name before 
doing the actual put - we insure that the
  -     * name value pair lives in the newCache data space.  After executing 
the put - we determine if the cache is full
  +     * By invoking a get for the Object associated with the name before doing
  +     * the actual put - we insure that the name value pair lives in the 
newCache
  +     * data space.  After executing the put - we determine if the cache is 
full
        * - if so swap the data spaces - effectively clearing the newCache.
        *
        * @param key - name or key of the Object to be cached
  @@ -74,8 +76,9 @@
       }
   
       /**
  -     * Removes the Object associated with the given name from the both 
spaces of this cache store.
  -     * By doing a get before removing the object we insure that the object 
if in the cache has been moved to the newCache
  +     * Removes the Object associated with the given name from the both 
spaces of
  +     * this cache store. By doing a get before removing the object we insure
  +     * that the object if in the cache has been moved to the newCache
        *
        * @param key - name or key associated with the Object to be removed
        * @return the removed Object
  @@ -89,8 +92,9 @@
   
       /**
        * Gets the cached object associated with the given name.
  -     * If the object does not exist within the newCache the old is checked.  
If the cache is determined to be full
  -     * the spaces are swapped - effectively clearing the newCache.  The 
object is then put into the newCache.
  +     * If the object does not exist within the newCache the old is checked.
  +     * If the cache is determined to be full the spaces are swapped
  +     * - effectively clearing the newCache.  The object is then put into the 
newCache.
        *
        * @param key - the name or key of the requested object
        * @return the requested Object
  @@ -119,10 +123,12 @@
       }
   
       /**
  -     * Erase the oldCache - releasing those objects that are still 
considered old by the time the newCache has been
  -     * determined to be full.  Move the newCache to old and the previously 
oldCache to newCache effectively clearing
  -     * it.  Over time accessing objects will move them from the oldCache to 
the newCache leaving those objects behind
  -     * that shall be cleared as the newCache is determined to be full again.
  +     * Erase the oldCache - releasing those objects that are still considered
  +     * old by the time the newCache has been determined to be full.
  +     * Move the newCache to old and the previously oldCache to newCache
  +     * effectively clearing it. Over time accessing objects will move them 
from
  +     * the oldCache to the newCache leaving those objects behind that shall 
be
  +     * cleared as the newCache is determined to be full again.
        */
       private void copySpaces()
       {
  @@ -142,7 +148,8 @@
       }
   
       /**
  -     * Gets the capacity for the cache.  Once the cache size has reached the 
capacity it is considered full.
  +     * Gets the capacity for the cache.
  +     * Once the cache size has reached the capacity it is considered full.
        *
        * @return cache capacity
        */
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to