@Test public void testRefresh() { Lookup<Long> counter = new Lookup<Long>() { public synchronized Long lookup() { return value.get(); } }; StepBehindCache<Long> cache = new StepBehindCache<Long>(counter, 0L); Assert.assertEquals(cache.get().longValue(), 0L); value.set(MAGIC); cache.refresh(); Assert.assertEquals(cache.get().longValue(), MAGIC); }
public void refresh() { cache.set(null); backgroundLookup(); }
StepBehindCache { public void refresh() { cache.set(null); backgroundLookup(); } }
StepBehindCache { public void refresh() { cache.set(null); backgroundLookup(); } StepBehindCache(Lookup<T> lookup, long delay);  StepBehindCache(Lookup<T> lookup); }
StepBehindCache { public void refresh() { cache.set(null); backgroundLookup(); } StepBehindCache(Lookup<T> lookup, long delay);  StepBehindCache(Lookup<T> lookup); T get(); void refresh(); }
StepBehindCache { public void refresh() { cache.set(null); backgroundLookup(); } StepBehindCache(Lookup<T> lookup, long delay);  StepBehindCache(Lookup<T> lookup); T get(); void refresh();  }