Coverage Report - org.apache.commons.cache.CacheStat
 
Classes in this File Line Coverage Branch Coverage Complexity
CacheStat
0%
0/21
0%
0/4
1
 
 1  
 /*
 2  
  * Copyright 2001-2004 The Apache Software Foundation
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.apache.commons.cache;
 17  
 
 18  
 import java.io.Serializable;
 19  
 
 20  
 /**
 21  
  * .
 22  
  *
 23  
  * @ATVERSION@
 24  
  * @author Rodney Waldhoff
 25  
  */
 26  
 public final class CacheStat implements Serializable {
 27  0
   private static int _counter = 0;
 28  
 
 29  
   public final String strVal;
 30  0
   public final int intVal = _counter++;
 31  
 
 32  0
   private CacheStat() {
 33  0
     strVal= null;
 34  0
   }
 35  
 
 36  0
   private CacheStat(String name) {
 37  0
     strVal= name;
 38  0
   }
 39  
 
 40  
   public String toString() {
 41  0
     return strVal;
 42  
   }
 43  
 
 44  
   public int getIntValue() {
 45  0
     return intVal;
 46  
   }
 47  
 
 48  
   public String getStrValue() {
 49  0
     return strVal;
 50  
   }
 51  
 
 52  
   public boolean equals(CacheStat stat) {
 53  0
     return (null != stat && stat.strVal.equals(strVal));
 54  
   }
 55  
 
 56  
   public int hashCode() {
 57  0
     return intVal;
 58  
   }
 59  
 
 60  0
   public static final CacheStat NUM_RETRIEVE_REQUESTED = new CacheStat("number of retrievals requested");
 61  0
   public static final CacheStat NUM_RETRIEVE_FOUND = new CacheStat("number of retrievals found");
 62  0
   public static final CacheStat NUM_RETRIEVE_NOT_FOUND = new CacheStat("number of retrievals not found");
 63  0
   public static final CacheStat NUM_STORE_REQUESTED = new CacheStat("number of stores requested");
 64  0
   public static final CacheStat NUM_STORE_STORED = new CacheStat("number of objects stored");
 65  0
   public static final CacheStat NUM_STORE_NOT_STORED = new CacheStat("number of objects not stored");
 66  0
   public static final CacheStat NUM_CLEARED = new CacheStat("number of objects cleared");
 67  0
   public static final CacheStat CUR_CAPACITY = new CacheStat("current capacity");
 68  
 }