asmuts      02/01/16 09:04:47

  Modified:    src/java/org/apache/stratum/jcs/engine CacheInfo.java
               src/java/org/apache/stratum/jcs/auxiliary/lateral/http/remove
                        DeleteLateralCacheMulticaster.java
               src/java/org/apache/stratum/jcs/utils/servlet/session
                        DistSession.java
               src/java/org/apache/stratum/jcs/access GroupCacheAccess.java
                        TestCacheAccess.java
               src/java/org/apache/stratum/jcs/engine/behavior ICache.java
               src/java/org/apache/stratum/jcs/access/behavior
                        IGroupCacheAccess.java
               src/java/org/apache/stratum/jcs/auxiliary/lateral/http/broadcast
                        LateralCacheMulticaster.java
               src/java/org/apache/stratum/jcs/test/servlet
                        ListTestCacheServlet.java
               src/java/org/apache/stratum/jcs/utils/log LogViewer.java
               src/java/org/apache/stratum/jcs/utils/data Queue.java
                        QueueV.java
  Log:
  changed the groupCacheAccess interface to make it more intuitive
  
  Revision  Changes    Path
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/CacheInfo.java
  
  Index: CacheInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/CacheInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CacheInfo.java    15 Jan 2002 21:33:33 -0000      1.3
  +++ CacheInfo.java    16 Jan 2002 17:04:47 -0000      1.4
  @@ -2,7 +2,6 @@
   
   import java.rmi.dgc.VMID;
   
  -import org.apache.stratum.jcs.engine.CacheInfo;
   
   /**
    *  A shared static variable holder for the lateral cache
  
  
  
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheMulticaster.java
  
  Index: DeleteLateralCacheMulticaster.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/lateral/http/remove/DeleteLateralCacheMulticaster.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DeleteLateralCacheMulticaster.java        15 Jan 2002 21:33:31 -0000      1.3
  +++ DeleteLateralCacheMulticaster.java        16 Jan 2002 17:04:47 -0000      1.4
  @@ -3,7 +3,6 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   
  -import 
org.apache.stratum.jcs.auxiliary.lateral.http.remove.DeleteLateralCacheMulticaster;
   import 
org.apache.stratum.jcs.auxiliary.lateral.http.remove.DeleteLateralCacheUnicaster;
   
   import org.apache.stratum.jcs.utils.log.Logger;
  
  
  
  1.4       +6 -6      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/servlet/session/DistSession.java
  
  Index: DistSession.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/servlet/session/DistSession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DistSession.java  15 Jan 2002 21:33:37 -0000      1.3
  +++ DistSession.java  16 Jan 2002 17:04:47 -0000      1.4
  @@ -74,7 +74,7 @@
           // not necessary if you don't set default element attributes
           // try to get data in the session_id group under the session_id key
   
  -        sessInfo = ( SessionInfo ) sessCache.getG( session_id, session_id );
  +        sessInfo = ( SessionInfo ) sessCache.getFromGroup( session_id, session_id );
   
           if ( sessInfo == null )
           {
  @@ -98,7 +98,7 @@
               session_id = SessionIdGenerator.createSessionId();
   
               // key, group, value
  -            sessCache.putG( session_id, session_id, sessInfo );
  +            sessCache.putInGroup( session_id, session_id, sessInfo );
           }
           catch ( Exception e )
           {}
  @@ -130,7 +130,7 @@
           {
               throw new IllegalStateException( "Cannot setAttribute on an invalid 
session " + this );
           }
  -        return sessCache.getG( name, session_id );
  +        return sessCache.getFromGroup( name, session_id );
       }
   
   
  @@ -191,7 +191,7 @@
           {
               log.info( "updating lastAccess for " + this );
               sessInfo.lastAccessedTime = System.currentTimeMillis();
  -            sessCache.putG( session_id, session_id, sessInfo );
  +            sessCache.putInGroup( session_id, session_id, sessInfo );
           }
           catch ( Exception e )
           {}
  @@ -320,7 +320,7 @@
               throw new IllegalStateException( "Cannot setAttribute on an invalid 
session " + this );
           }
           // Needs to retrive the attribute so as to do object unbinding, if 
necessary.
  -        Serializable val = ( Serializable ) sessCache.getG( name, session_id );
  +        Serializable val = ( Serializable ) sessCache.getFromGroup( name, 
session_id );
   
           if ( val == null )
           {
  @@ -373,7 +373,7 @@
   
           try
           {
  -            sessCache.putG( name, session_id, value );
  +            sessCache.putInGroup( name, session_id, value );
           }
           catch ( Exception e )
           {}
  
  
  
  1.6       +29 -23    
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/GroupCacheAccess.java
  
  Index: GroupCacheAccess.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/GroupCacheAccess.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GroupCacheAccess.java     16 Jan 2002 05:32:47 -0000      1.5
  +++ GroupCacheAccess.java     16 Jan 2002 17:04:47 -0000      1.6
  @@ -170,13 +170,13 @@
   
       /////////////////////////////////////////
       /**
  -     *  Gets the g attribute of the GroupCacheAccess object
  +     *  Gets an item out of the cache that is in a specified group.
        *
  -     *@param  name   Description of the Parameter
  -     *@param  group  Description of the Parameter
  -     *@return        The g value
  +     *@param  name   The key name.
  +     *@param  group  The group name.
  +     *@return        The cahe value, null if not found.
        */
  -    public Object getG( String name, String group )
  +    public Object getFromGroup( String name, String group )
       {
           return getAttribute( name, group );
       }
  @@ -202,14 +202,16 @@
   
       //////////////////////////////////////////////////
       /**
  -     *  Description of the Method
  -     *
  -     *@param  key                 Description of the Parameter
  -     *@param  group               Description of the Parameter
  -     *@param  value               Description of the Parameter
  +     *  Allows the user to put an object into a group within a particular cache
  +     *  region.  This method sets the object's attributes to the default for
  +     *  the region.
  +     *
  +     *@param  key                 The key name.
  +     *@param  group               The group name.
  +     *@param  value               The object to cache
        *@exception  CacheException  Description of the Exception
        */
  -    public void putG( Object key, String group, Object value )
  +    public void putInGroup( Object key, String group, Object value )
           throws CacheException
       {
           setAttribute( ( String ) key, group, value );
  @@ -218,15 +220,17 @@
       //////////////////////////////////////////////////////////////////////
   
       /**
  -     *  Description of the Method
  -     *
  -     *@param  key                 Description of the Parameter
  -     *@param  group               Description of the Parameter
  -     *@param  value               Description of the Parameter
  -     *@param  attr                Description of the Parameter
  +     *  Allows the user to put an object into a group within a particular cache
  +     *  region.  This method allows the object's attributes to be individually
  +     *  specified.
  +     *
  +     *@param  key                 The key name.
  +     *@param  group               The group name.
  +     *@param  value               The object to cache
  +     *@param  attr                The objects attributes.
        *@exception  CacheException  Description of the Exception
        */
  -    public void putG( Object key, String group, Object value, Attributes attr )
  +    public void putInGroup( Object key, String group, Object value, Attributes attr 
)
           throws CacheException
       {
           setAttribute( ( String ) key, group, value, attr );
  @@ -239,7 +243,7 @@
        *  region or group the new group is associated with are used. If group is
        *  specified the new group will be associated with the group specified.
        *
  -     *@param  name                Description of the Parameter
  +     *@param  name                Name of the gorup.
        *@exception  CacheException  Description of the Exception
        */
       public void defineGroup( String name )
  @@ -272,8 +276,8 @@
       /**
        *  Description of the Method
        *
  -     *@param  name                Description of the Parameter
  -     *@param  attr                Description of the Parameter
  +     *@param  name                Name of the group
  +     *@param  attr                Default attributes for the group.
        *@exception  CacheException  Description of the Exception
        */
       public void defineGroup( String name, Attributes attr )
  @@ -306,10 +310,12 @@
   
       ///////////////////////////////////////////////////////////////////////
       /**
  -     *  Gets the groupAttributes attribute of the GroupCacheAccess object
  +     *  Gets the groupAttributes attribute of the GroupCacheAccess object.
  +     *  Slighly confusing since the other method conside an "attribute" to be
  +     *  an element of the cache and not the parameters governing an element.
        *
        *@param  name                Description of the Parameter
  -     *@return                     The groupAttributes value
  +     *@return                     The Element Attributes for the group
        *@exception  CacheException  Description of the Exception
        */
       public Attributes getGroupAttributes( Object name )
  
  
  
  1.5       +4 -4      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/TestCacheAccess.java
  
  Index: TestCacheAccess.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/TestCacheAccess.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestCacheAccess.java      15 Jan 2002 22:25:49 -0000      1.4
  +++ TestCacheAccess.java      16 Jan 2002 17:04:47 -0000      1.5
  @@ -294,7 +294,7 @@
                               long n_start = System.currentTimeMillis();
                               try
                               {
  -                                Object obj = cache_control.getG( key, group );
  +                                Object obj = cache_control.getFromGroup( key, group 
);
                                   if ( show && obj != null )
                                   {
                                       p( obj.toString() );
  @@ -356,7 +356,7 @@
                               {
                                   for ( int a = 0; a < num; a++ )
                                   {
  -                                    Object obj = cache_control.getG( "keygr" + a, 
group );
  +                                    Object obj = cache_control.getFromGroup( 
"keygr" + a, group );
                                       if ( show && obj != null )
                                       {
                                           p( obj.toString() );
  @@ -459,7 +459,7 @@
                               attrp.setFlags( attrp.LATERAL );
                               attrp.setFlags( attrp.REMOTE );
                               long n_start = System.currentTimeMillis();
  -                            cache_control.putG( key, group, "data from putg 
----asdfasfas-asfasfas-asfas in group " + group, attrp.copy() );
  +                            cache_control.putInGroup( key, group, "data from putg 
----asdfasfas-asfasfas-asfas in group " + group, attrp.copy() );
                               long n_end = System.currentTimeMillis();
                               p( "---put " + key + " in group " + group + " in " + 
String.valueOf( n_end - n_start ) + " millis ---" );
                           }
  @@ -500,7 +500,7 @@
                               long n_start = System.currentTimeMillis();
                               for ( int a = 0; a < num; a++ )
                               {
  -                                cache_control.putG( "keygr" + a, group, "data " + a 
+ " from putag ----asdfasfas-asfasfas-asfas in group " + group, attrp.copy() );
  +                                cache_control.putInGroup( "keygr" + a, group, "data 
" + a + " from putag ----asdfasfas-asfasfas-asfas in group " + group, attrp.copy() );
                               }
                               long n_end = System.currentTimeMillis();
                               p( "---put " + num + " in group " + group + " in " + 
String.valueOf( n_end - n_start ) + " millis ---" );
  
  
  
  1.4       +10 -5     
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/behavior/ICache.java
  
  Index: ICache.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/behavior/ICache.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ICache.java       15 Jan 2002 21:33:34 -0000      1.3
  +++ ICache.java       16 Jan 2002 17:04:47 -0000      1.4
  @@ -15,23 +15,28 @@
   {
   
       /**
  -     *  Description of the Field
  +     *  Where the current activity came from. This effects whether
  +     *  the remote will be included.  Prevents remote-local loops.
        */
       public static boolean REMOTE_INVOKATION = true;
       /**
  -     *  Description of the Field
  +     *  Where the current activity came from. This effects whether
  +     *  the remote will be included.  Prevents remote-local loops.
        */
       public static boolean LATERAL_INVOKATION = true;
       /**
  -     *  Description of the Field
  +     *  Where the current activity came from. This effects whether
  +     *  the remote will be included.  Prevents remote-local loops.
        */
       public static boolean LOCAL_INVOKATION = !REMOTE_INVOKATION;
  +
  +
       /**
  -     *  Description of the Field
  +     *  Whether the update should propagate to the remote
        */
       public static boolean INCLUDE_REMOTE_CACHE = true;
       /**
  -     *  Description of the Field
  +     *  Whether the update should propagate to the remote
        */
       public static boolean EXCLUDE_REMOTE_CACHE = !INCLUDE_REMOTE_CACHE;
       /**
  
  
  
  1.6       +3 -3      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/behavior/IGroupCacheAccess.java
  
  Index: IGroupCacheAccess.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/behavior/IGroupCacheAccess.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IGroupCacheAccess.java    15 Jan 2002 22:25:50 -0000      1.5
  +++ IGroupCacheAccess.java    16 Jan 2002 17:04:47 -0000      1.6
  @@ -78,7 +78,7 @@
        *@param  group  Description of the Parameter
        *@return        The g value
        */
  -    Object getG( String name, String group );
  +    Object getFromGroup( String name, String group );
   
   
       /////////////////////////////////////////
  @@ -90,7 +90,7 @@
        *@param  obj                 Description of the Parameter
        *@exception  CacheException  Description of the Exception
        */
  -    void putG( Object key, String group, Object obj )
  +    void putInGroup( Object key, String group, Object obj )
           throws CacheException;
   
   
  @@ -104,7 +104,7 @@
        *@param  attr                Description of the Parameter
        *@exception  CacheException  Description of the Exception
        */
  -    void putG( Object key, String group, Object obj, Attributes attr )
  +    void putInGroup( Object key, String group, Object obj, Attributes attr )
           throws CacheException;
   
   
  
  
  
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/lateral/http/broadcast/LateralCacheMulticaster.java
  
  Index: LateralCacheMulticaster.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/lateral/http/broadcast/LateralCacheMulticaster.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LateralCacheMulticaster.java      15 Jan 2002 21:33:31 -0000      1.3
  +++ LateralCacheMulticaster.java      16 Jan 2002 17:04:47 -0000      1.4
  @@ -3,7 +3,6 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   
  -import 
org.apache.stratum.jcs.auxiliary.lateral.http.broadcast.LateralCacheMulticaster;
   import 
org.apache.stratum.jcs.auxiliary.lateral.http.broadcast.LateralCacheUnicaster;
   
   import org.apache.stratum.jcs.engine.behavior.ICacheElement;
  
  
  
  1.4       +1 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/test/servlet/ListTestCacheServlet.java
  
  Index: ListTestCacheServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/test/servlet/ListTestCacheServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ListTestCacheServlet.java 15 Jan 2002 21:33:35 -0000      1.3
  +++ ListTestCacheServlet.java 16 Jan 2002 17:04:47 -0000      1.4
  @@ -341,7 +341,7 @@
   
                       // key, group, value
                       // could create a group if we need to retrieve the list of 
elements
  -                    cityGroupCache.putG( city + ":" + zip, city, zip );
  +                    cityGroupCache.putInGroup( city + ":" + zip, city, zip );
                       // or you could just use the : for partial removal if all you 
need
                       // to do is remove, can't do partial lookup like this
                       // if you wanted to store info instead of the zip this would
  
  
  
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/log/LogViewer.java
  
  Index: LogViewer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/log/LogViewer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LogViewer.java    15 Jan 2002 21:33:36 -0000      1.3
  +++ LogViewer.java    16 Jan 2002 17:04:47 -0000      1.4
  @@ -24,7 +24,6 @@
   
   import org.apache.stratum.jcs.utils.log.Logger;
   import org.apache.stratum.jcs.utils.log.LoggerManager;
  -import org.apache.stratum.jcs.utils.log.LogViewer;
   
   import org.apache.stratum.jcs.utils.net.LocalHost;
   
  
  
  
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/data/Queue.java
  
  Index: Queue.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/data/Queue.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Queue.java        15 Jan 2002 21:33:35 -0000      1.3
  +++ Queue.java        16 Jan 2002 17:04:47 -0000      1.4
  @@ -2,7 +2,6 @@
   
   import java.util.Vector;
   
  -import org.apache.stratum.jcs.utils.data.Queue;
   
   /**
    *  Description of the Class
  
  
  
  1.4       +0 -1      
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/data/QueueV.java
  
  Index: QueueV.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/utils/data/QueueV.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueueV.java       15 Jan 2002 21:33:36 -0000      1.3
  +++ QueueV.java       16 Jan 2002 17:04:47 -0000      1.4
  @@ -2,7 +2,6 @@
   
   import java.util.Vector;
   
  -import org.apache.stratum.jcs.utils.data.QueueV;
   
   /**
    *  Description of the Class
  
  
  

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

Reply via email to