@Override public void onFetchedBlock() { boolean dontNotify = true; if(getter.hasQueued()) { dontNotify = false; } else { synchronized(this) { if(storeFetchCounter++ == STORE_NOTIFY_BLOCKS) { storeFetchCounter = 0; dontNotify = false; lastNotifiedStoreFetch = System.currentTimeMillis(); } else { long now = System.currentTimeMillis(); if(now - lastNotifiedStoreFetch >= STORE_NOTIFY_INTERVAL) { dontNotify = false; lastNotifiedStoreFetch = now; } } } } parent.completedBlock(dontNotify, context); }