Search in sources :

Example 1 with PREntriesIterator

use of org.apache.geode.internal.cache.partitioned.PREntriesIterator in project geode by apache.

the class RetrieveRegionFunction method retrieveFullRegion.

/** ------------------------------------------ */
/**         Retrieve full region data          */
/** ------------------------------------------ */
private void retrieveFullRegion(InternalRegionFunctionContext context, boolean partitioned, String desc) {
    Iterator<Object[]> entries;
    if (partitioned) {
        PREntriesIterator<Region.Entry> iter = (PREntriesIterator<Region.Entry>) ((LocalDataSet) PartitionRegionHelper.getLocalDataForContext(context)).entrySet().iterator();
        // entries = getPREntryIterator(iter);
        entries = getSimpleEntryIterator(iter);
    } else {
        LocalRegion owner = (LocalRegion) context.getDataSet();
        Iterator<Region.Entry> iter = (Iterator<Region.Entry>) owner.entrySet().iterator();
        // entries = getRREntryIterator(iter, owner);
        entries = getSimpleEntryIterator(iter);
    }
    InternalResultSender irs = (InternalResultSender) context.getResultSender();
    StructStreamingResultSender sender = new StructStreamingResultSender(irs, null, entries, desc);
    sender.send();
}
Also used : PREntriesIterator(org.apache.geode.internal.cache.partitioned.PREntriesIterator) Iterator(java.util.Iterator) PREntriesIterator(org.apache.geode.internal.cache.partitioned.PREntriesIterator) Region(org.apache.geode.cache.Region) InternalResultSender(org.apache.geode.internal.cache.execute.InternalResultSender)

Aggregations

Iterator (java.util.Iterator)1 Region (org.apache.geode.cache.Region)1 InternalResultSender (org.apache.geode.internal.cache.execute.InternalResultSender)1 PREntriesIterator (org.apache.geode.internal.cache.partitioned.PREntriesIterator)1