Search in sources :

Example 1 with QRegion

use of org.apache.geode.cache.query.internal.QRegion in project geode by apache.

the class DummyQRegion method getEntries.

@Override
public SelectResults getEntries() {
    if (entries == null) {
        entries = new ResultsSet();
        entries.setElementType(TypeUtils.getRegionEntryType(getRegion()));
    }
    entries.clear();
    // return collection of Region.Entry, not (dotless) RegionEntry
    Region rgn = getRegion();
    // unwrap until we get the LocalRegion
    while (!(rgn instanceof LocalRegion)) {
        rgn = ((QRegion) TypeUtils.checkCast(rgn, QRegion.class)).getRegion();
    }
    entries.add(((LocalRegion) rgn).new NonTXEntry(entry));
    return entries;
}
Also used : ResultsSet(org.apache.geode.cache.query.internal.ResultsSet) LocalRegion(org.apache.geode.internal.cache.LocalRegion) Region(org.apache.geode.cache.Region) QRegion(org.apache.geode.cache.query.internal.QRegion) LocalRegion(org.apache.geode.internal.cache.LocalRegion)

Aggregations

Region (org.apache.geode.cache.Region)1 QRegion (org.apache.geode.cache.query.internal.QRegion)1 ResultsSet (org.apache.geode.cache.query.internal.ResultsSet)1 LocalRegion (org.apache.geode.internal.cache.LocalRegion)1