1 31 32 package org.opencms.flex; 33 34 43 public class CmsFlexCacheConfiguration { 44 45 private int m_avgCacheBytes; 46 47 48 private boolean m_cacheEnabled; 49 50 51 private boolean m_cacheOffline; 52 53 61 private int m_maxCacheBytes; 62 63 private int m_maxEntryBytes; 64 65 private int m_maxKeys; 66 67 70 public CmsFlexCacheConfiguration() { 71 72 } 74 75 80 public int getAvgCacheBytes() { 81 82 return m_avgCacheBytes; 83 } 84 85 90 public int getMaxCacheBytes() { 91 92 return m_maxCacheBytes; 93 } 94 95 100 public int getMaxEntryBytes() { 101 102 return m_maxEntryBytes; 103 } 104 105 110 public int getMaxKeys() { 111 112 return m_maxKeys; 113 } 114 115 125 public void initialize( 126 String enabled, 127 String offline, 128 String maxCacheBytes, 129 String avgCacheBytes, 130 String maxEntryBytes, 131 String maxKeys) { 132 133 setCacheEnabled(Boolean.valueOf(enabled).booleanValue()); 134 setCacheOffline(Boolean.valueOf(offline).booleanValue()); 135 setMaxCacheBytes(Integer.parseInt(maxCacheBytes)); 136 setAvgCacheBytes(Integer.parseInt(avgCacheBytes)); 137 setMaxEntryBytes(Integer.parseInt(maxEntryBytes)); 138 setMaxKeys(Integer.parseInt(maxKeys)); 139 } 140 141 146 public boolean isCacheEnabled() { 147 148 return m_cacheEnabled; 149 } 150 151 156 public boolean isCacheOffline() { 157 158 return m_cacheOffline; 159 } 160 161 166 public void setAvgCacheBytes(int avgCacheBytes) { 167 168 m_avgCacheBytes = avgCacheBytes; 169 } 170 171 176 public void setCacheEnabled(boolean enabled) { 177 178 m_cacheEnabled = enabled; 179 } 180 181 186 public void setCacheOffline(boolean cacheOffline) { 187 188 m_cacheOffline = cacheOffline; 189 } 190 191 196 public void setMaxCacheBytes(int maxCacheBytes) { 197 198 m_maxCacheBytes = maxCacheBytes; 199 } 200 201 206 public void setMaxEntryBytes(int maxEntryBytes) { 207 208 m_maxEntryBytes = maxEntryBytes; 209 } 210 211 216 public void setMaxKeys(int maxKeys) { 217 218 m_maxKeys = maxKeys; 219 } 220 } 221 | Popular Tags |