/** * @author PoisonSoft * * 何もしないCache */ public class NoCache implements Cache { private CacheSource source = null; /** * Constructor for NoCache. */ public NoCache(CacheSource source) { this.source = source; } /** * @see Cache#read(Object) */ public Object read(Object key) throws CacheException { try { return source.read(key); } catch (CacheSourceException e) { throw new CacheException(e); } } /** * @see Cache#write(Object, Object) */ public void write(Object key, Object value) throws CacheException { try { source.write(key, value); } catch (CacheSourceException e) { throw new CacheException(e); } } /** * @see Cache#delete(Object) */ public void delete(Object key) throws CacheException { try { source.delete(key); } catch (CacheSourceException e) { throw new CacheException(e); } } } // end of file