IdCache shouldn't implement Iterable

This commit is contained in:
Martijn van Groningen 2014-01-03 13:25:27 +01:00
parent 38f038f899
commit 48c63c137a
2 changed files with 1 additions and 7 deletions

View File

@ -32,7 +32,7 @@ import java.util.List;
* This id cache contains only the ids of parent documents, loaded via the uid or parent field.
* This name IdCache is misleading, parentIdCache would be a better name.
*/
public interface IdCache extends IndexComponent, CloseableComponent, Iterable<IdReaderCache> {
public interface IdCache extends IndexComponent, CloseableComponent {
// we need to "inject" the index service to not create cyclic dep
void setIndexService(IndexService indexService);

View File

@ -105,12 +105,6 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache, Se
return idReaders.get(reader.getCoreCacheKey());
}
@SuppressWarnings({"unchecked"})
@Override
public Iterator<IdReaderCache> iterator() {
return (Iterator<IdReaderCache>) idReaders.values();
}
@SuppressWarnings({"StringEquality"})
@Override
public void refresh(List<AtomicReaderContext> atomicReaderContexts) throws IOException {