//         @Override
//         public void apply(Object key, OffHeapInternalCacheEntry value) {
//            if (filter.shouldLoadKey((K)key)) {
//               action.apply((K)key, value);
//            }
//         }
@Override
   public <K> void executeTask(
           final AdvancedCacheLoader.KeyFilter<K> filter,
           final ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry> action
   ) throws InterruptedException{
      if (filter == null)
         throw new IllegalArgumentException("No filter specified");
      if (action == null)
         throw new IllegalArgumentException("No action specified");
      ParallelIterableMap<Object, InternalCacheEntry> map =
              (ParallelIterableMap<Object, InternalCacheEntry>) entries;
       map.forEach(512, new ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry>() {
           @Override
           public void apply(Object o, InternalCacheEntry internalCacheEntry) {
           }
//         @Override
//         public void apply(Object key, OffHeapInternalCacheEntry value) {
//            if (filter.shouldLoadKey((K)key)) {
//               action.apply((K)key, value);
//            }
//         }
      });
      //TODO figure out the way how to do interruption better (during iteration)
      if(Thread.currentThread().isInterrupted()){
         throw new InterruptedException();
      }
   }
public void apply(Object o, InternalCacheEntry internalCacheEntry) {
}
// @Override
// public void apply(Object key, OffHeapInternalCacheEntry value) {
// if (filter.shouldLoadKey((K)key)) {
// action.apply((K)key, value);
// }
// }
});
//TODO figure out the way how to do interruption better (during iteration)
if (filter == null)
throw new IllegalArgumentException("No filter specified");
if (action == null)
throw new IllegalArgumentException("No action specified");
ParallelIterableMap<Object, InternalCacheEntry> map =
(ParallelIterableMap<Object, InternalCacheEntry>) entries;
map.forEach(512, new ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry>() {
@Override
public void apply(Object o, InternalCacheEntry internalCacheEntry) {
}
// @Override
// public void apply(Object key, OffHeapInternalCacheEntry value) {
// if (filter.shouldLoadKey((K)key)) {
// action.apply((K)key, value);
// }
// }
});
//TODO figure out the way how to do interruption better (during iteration)
if(Thread.currentThread().isInterrupted()){
throw new InterruptedException();
}
}
@Override
public <K> void executeTask(
final AdvancedCacheLoader.KeyFilter<K> filter,
final ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry> action
) throws InterruptedException{
if (filter == null)
throw new IllegalArgumentException("No filter specified");
if (action == null)
throw new IllegalArgumentException("No action specified");
ParallelIterableMap<Object, InternalCacheEntry> map =
(ParallelIterableMap<Object, InternalCacheEntry>) entries;
map.forEach(512, new ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry>() {
@Override
public void apply(Object o, InternalCacheEntry internalCacheEntry) {
}
// @Override
// public void apply(Object key, OffHeapInternalCacheEntry value) {
// if (filter.shouldLoadKey((K)key)) {
// action.apply((K)key, value);
// }
// }
});
//TODO figure out the way how to do interruption better (during iteration)
if(Thread.currentThread().isInterrupted()){
throw new InterruptedException();
}
}