public void cleanupMemoryStorage() {
   for (UpdatableIndex index : myIndices.values()) {
     final IndexStorage indexStorage = ((MapReduceIndex) index).getStorage();
     index.getWriteLock().lock();
     try {
       ((MemoryIndexStorage) indexStorage).clearMemoryMap();
     } finally {
       index.getWriteLock().unlock();
     }
   }
 }
 public void setDataBufferingEnabled(final boolean enabled) {
   for (UpdatableIndex index : myIndices.values()) {
     final IndexStorage indexStorage = ((MapReduceIndex) index).getStorage();
     ((MemoryIndexStorage) indexStorage).setBufferingEnabled(enabled);
   }
 }