@Test public void testInvalidateAll() { context.invalidateAll(false); verifyZeroInteractions(executorService); verify(cache).invalidateAll(any(Experiment.BuilderFactory.class)); }
public void invalidateAll(boolean async) { if (async) { executorService.execute(new Runnable() { @Override public void run() { safeInvalidateAll(builderFactory); } }); } else { safeInvalidateAll(builderFactory); } }
CachingContext implements Closeable { public void invalidateAll(boolean async) { if (async) { executorService.execute(new Runnable() { @Override public void run() { safeInvalidateAll(builderFactory); } }); } else { safeInvalidateAll(builderFactory); } } }
CachingContext implements Closeable { public void invalidateAll(boolean async) { if (async) { executorService.execute(new Runnable() { @Override public void run() { safeInvalidateAll(builderFactory); } }); } else { safeInvalidateAll(builderFactory); } } CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory,
                          ExecutorService executorService);  CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory); }
CachingContext implements Closeable { public void invalidateAll(boolean async) { if (async) { executorService.execute(new Runnable() { @Override public void run() { safeInvalidateAll(builderFactory); } }); } else { safeInvalidateAll(builderFactory); } } CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory,
                          ExecutorService executorService);  CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory); void invalidateAll(boolean async); void invalidate(final String experimentName, boolean async); void update(Experiment experiment); void delete(String experimentName); boolean checkIfAnyStale(); boolean checkIfStale(String experimentName); @Override void close(); }
CachingContext implements Closeable { public void invalidateAll(boolean async) { if (async) { executorService.execute(new Runnable() { @Override public void run() { safeInvalidateAll(builderFactory); } }); } else { safeInvalidateAll(builderFactory); } } CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory,
                          ExecutorService executorService);  CachingContext(ExperimentsCache cache,
                          Experiment.BuilderFactory builderFactory); void invalidateAll(boolean async); void invalidate(final String experimentName, boolean async); void update(Experiment experiment); void delete(String experimentName); boolean checkIfAnyStale(); boolean checkIfStale(String experimentName); @Override void close();  }