1 23 24 28 29 package com.sun.appserv.util.cache.mbeans; 30 31 import com.sun.appserv.util.cache.BaseCache; 32 import com.sun.appserv.util.cache.Constants; 33 34 40 public class JmxBaseCache implements JmxBaseCacheMBean { 41 42 private String name; 43 private BaseCache baseCache; 44 45 public JmxBaseCache(BaseCache baseCache, String name) { 46 this.baseCache = baseCache; 47 this.name = name; 48 } 49 52 public String getName() { 53 return name; 54 } 55 56 59 public Integer getMaxEntries() { 60 return (Integer ) baseCache.getStatByName( 61 Constants.STAT_BASECACHE_MAX_ENTRIES); 62 } 63 64 67 public Integer getThreshold() { 68 return (Integer ) baseCache.getStatByName( 69 Constants.STAT_BASECACHE_THRESHOLD); 70 } 71 72 75 public Integer getTableSize() { 76 return (Integer ) baseCache.getStatByName( 77 Constants.STAT_BASECACHE_TABLE_SIZE); 78 } 79 80 83 public Integer getEntryCount() { 84 return (Integer ) baseCache.getStatByName( 85 Constants.STAT_BASECACHE_ENTRY_COUNT); 86 } 87 88 91 public Integer getHitCount() { 92 return (Integer ) baseCache.getStatByName( 93 Constants.STAT_BASECACHE_HIT_COUNT); 94 } 95 96 99 public Integer getMissCount() { 100 return (Integer ) baseCache.getStatByName( 101 Constants.STAT_BASECACHE_MISS_COUNT); 102 } 103 104 107 public Integer getRemovalCount() { 108 return (Integer ) baseCache.getStatByName( 109 Constants.STAT_BASECACHE_REMOVAL_COUNT); 110 } 111 112 116 public Integer getRefreshCount() { 117 return (Integer ) baseCache.getStatByName( 118 Constants.STAT_BASECACHE_REFRESH_COUNT); 119 } 120 121 124 public Integer getOverflowCount() { 125 return (Integer ) baseCache.getStatByName( 126 Constants.STAT_BASECACHE_OVERFLOW_COUNT); 127 } 128 129 132 public Integer getAddCount() { 133 return (Integer ) baseCache.getStatByName( 134 Constants.STAT_BASECACHE_ADD_COUNT); 135 } 136 } 137 | Popular Tags |