1 15 16 package com.jdon.controller.cache; 17 18 import com.jdon.util.PropsUtil; 19 import com.jdon.util.UtilCache; 20 21 29 public class LRUCache implements Cache { 30 31 private UtilCache cache; 32 33 38 public LRUCache(String configFileName) { 39 PropsUtil propsUtil = new PropsUtil(configFileName); 40 cache = new UtilCache(propsUtil); 41 } 42 43 public Object get(Object key) { 44 return cache.get(key); 45 } 46 47 public void put(Object key, Object value) { 48 cache.put(key, value); 49 } 50 51 public void remove(Object key) { 52 cache.remove(key); 53 } 54 55 public long size() { 56 return cache.size(); 57 } 58 59 public void clear() { 60 cache.clear(); 61 } 62 63 public boolean contain(Object key) { 64 return cache.containsKey(key); 65 } 66 67 } 68 | Popular Tags |