@Override public boolean call(String key, long run) { MarshalledEntry me = store.load(key); if (trace) log.tracef("Loaded key=%s, value=%s", key, me != null ? me.getValue() : "null"); return me != null; } };
private void verifyCacheLoaderCount(int expectedCount, Cache... caches) { int count = 0; for (Cache<Object, Object> cache : caches) { count += ((AdvancedCacheLoader) TestingUtil.getFirstLoader(cache)).size(); } assertEquals(expectedCount, count); }
final AtomicBoolean sameKeyMultipleTimes = new AtomicBoolean(); assertEquals(loader.size(), 0); insertData(); Flowable<MarshalledEntry<Object, Object>> flowable = Flowable.fromPublisher(loader.publishEntries(null, fetchValues, fetchMetadata)); flowable = flowable.doOnNext(me -> { Integer key = unwrapKey(me.getKey());
boolean found = false; InternalCacheEntry se = preloadingCache.getAdvancedCache().getDataContainer().get(key); MarshalledEntry load = preloadingCacheLoader.load(key); if (se != null) { testStoredEntry(se.getValue(), value, se.getLifespan(), lifespan, "Cache", key); boolean found = false; InternalCacheEntry se = preloadingCache.getAdvancedCache().getDataContainer().get(key); MarshalledEntry load = preloadingCacheLoader.load(key); if (se != null) { testStoredEntry(se.getValue(), value, se.getLifespan(), lifespan, "Cache", key);