@Override
 public Collection<Notification> retrieveNotifications() {
   try {
     return Lists.newArrayList(notifications.asMap().values());
   } finally {
     notifications.invalidateAll();
     notifications.cleanUp();
   }
 }
 public static final Cache<String, BlockReader> buildCache(CacheBuilder builder) {
   if (singleCache != null) {
     singleCache.cleanUp();
   }
   if (enableStats) {
     // todo: when we upgrade to a newer guava version we can use this
     // builder.recordStats();
   }
   singleCache = builder.build();
   return singleCache;
 }