public void clearAllIndices() {
   for (UpdatableIndex index : myIndices.values()) {
     try {
       index.clear();
     } catch (StorageException e) {
       LOG.error(e);
       throw new RuntimeException(e);
     }
   }
 }
 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 dispose() {
   for (UpdatableIndex index : myIndices.values()) {
     index.dispose();
   }
 }