// (c) Tuomas J. Lukka package org.nongnu.libvob.util; /** A CacheControl that just prints out stuff. */ public class DbgCacheControl extends CacheControl { private void p(String s) { System.out.println(s); } public Listener registerCache_impl(final Object cache, final String name) { p("Cache: start listen "+cache+" "+name); return new Listener() { public void hit(Object key) { p("CacheHit: "+cache+" "+name+" "+key); } public void startMiss(Object key) { p("CacheStartMiss: "+cache+" "+name+" "+key); } public void endMiss(Object key) { p("CacheEndMiss: "+cache+" "+name+" "+key); } }; } }