use of com.github.benmanes.caffeine.jcache.management.JCacheStatisticsMXBean in project caffeine by ben-manes.
the class JCacheEvictionListenerTest method before.
@BeforeMethod
public void before() {
MockitoAnnotations.initMocks(this);
statistics = new JCacheStatisticsMXBean();
EventDispatcher<Integer, Integer> dispatcher = new EventDispatcher<>(MoreExecutors.directExecutor());
listener = new JCacheEvictionListener<>(dispatcher, statistics);
listener.setCache(cache);
statistics.enable(true);
dispatcher.register(new MutableCacheEntryListenerConfiguration<Integer, Integer>(() -> entryListener, null, false, false));
}
Aggregations