Search in sources :

Example 1 with MemoryIndexStoreEntry

use of org.apache.geode.cache.query.internal.index.MemoryIndexStore.MemoryIndexStoreEntry in project geode by apache.

the class IndexMaintenanceJUnitTest method validateIndexForEntries.

private void validateIndexForEntries(CompactRangeIndex ri) {
    assertEquals(6, ri.getIndexStorage().size());
    Iterator itr = ri.getIndexStorage().iterator(null);
    while (itr.hasNext()) {
        Object obj = itr.next();
        assertFalse(obj instanceof Collection);
        MemoryIndexStoreEntry re = (MemoryIndexStoreEntry) obj;
        Portfolio pf = (Portfolio) re.getRegionEntry().getValueInVM((LocalRegion) ri.getRegion());
        assertTrue(idSet.contains(String.valueOf(pf.getID())));
    }
}
Also used : Portfolio(org.apache.geode.cache.query.data.Portfolio) CloseableIterator(org.apache.geode.internal.cache.persistence.query.CloseableIterator) Iterator(java.util.Iterator) Collection(java.util.Collection) MemoryIndexStoreEntry(org.apache.geode.cache.query.internal.index.MemoryIndexStore.MemoryIndexStoreEntry) LocalRegion(org.apache.geode.internal.cache.LocalRegion)

Aggregations

Collection (java.util.Collection)1 Iterator (java.util.Iterator)1 Portfolio (org.apache.geode.cache.query.data.Portfolio)1 MemoryIndexStoreEntry (org.apache.geode.cache.query.internal.index.MemoryIndexStore.MemoryIndexStoreEntry)1 LocalRegion (org.apache.geode.internal.cache.LocalRegion)1 CloseableIterator (org.apache.geode.internal.cache.persistence.query.CloseableIterator)1