cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/caching ComponentCacheKey.java PipelineCacheKey.java
Date Thu, 08 Aug 2002 02:55:23 GMT
vgritsenko    2002/08/07 19:55:23

  Modified:    src/java/org/apache/cocoon/caching Tag: cocoon_2_0_3_branch
                        ComponentCacheKey.java PipelineCacheKey.java
  Log:
  Shorten a bit cache keys (even some cocoon docos could not be saved to FileStore). Use _
instead of :
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.2   +8 -5      xml-cocoon2/src/java/org/apache/cocoon/caching/ComponentCacheKey.java
  
  Index: ComponentCacheKey.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/ComponentCacheKey.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- ComponentCacheKey.java	19 Apr 2002 19:06:54 -0000	1.5.2.1
  +++ ComponentCacheKey.java	8 Aug 2002 02:55:22 -0000	1.5.2.2
  @@ -68,16 +68,19 @@
       public static final int ComponentType_Serializer  = 3;
       public static final int ComponentType_Reader      = 4;
   
  +    // Converts Generator / Transformer / Serializer / Reader constants above
  +    // into string.
  +    private static final String[] COMPONENTS = { "X", "G", "T", "S", "R" };
  +
       private String key;
   
       public ComponentCacheKey(int    componentType,
                                String componentIdentifier,
                                long   cacheKey) {
  -        // generate the toString value
  -        this.key = "CCK:"
  -            + componentType + '-'
  +        // Generate the toString value.
  +        this.key = COMPONENTS[componentType] + '-'
               + componentIdentifier + '-'
  -            + cacheKey;
  +            + cacheKey + '_';
       }
   
       public String toString() {
  
  
  
  1.5.2.2   +4 -4      xml-cocoon2/src/java/org/apache/cocoon/caching/PipelineCacheKey.java
  
  Index: PipelineCacheKey.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/PipelineCacheKey.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- PipelineCacheKey.java	19 Apr 2002 19:06:54 -0000	1.5.2.1
  +++ PipelineCacheKey.java	8 Aug 2002 02:55:22 -0000	1.5.2.2
  @@ -67,7 +67,7 @@
   
       public void addKey(ComponentCacheKey key) {
           if (this.value == null) {
  -            this.value = new StringBuffer("PCK:");
  +            this.value = new StringBuffer("PK_");
           }
           this.value.append(key.toString());
           toStringValue = null;
  @@ -75,7 +75,7 @@
   
       public void addKey(PipelineCacheKey key) {
           if (this.value == null) {
  -            this.value = new StringBuffer("PCK:");
  +            this.value = new StringBuffer("PK_");
           }
           this.value.append(key.toString());
           toStringValue = null;
  @@ -83,7 +83,7 @@
   
       public String toString() {
           if (value == null) {
  -            return "PCK:";
  +            return "PK_";
           }
           return (toStringValue = value.toString());
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message