public abstract class AbstractPartitionedIterator<T>
extends com.oracle.common.collections.AbstractStableIterator<T>
| Modifier and Type | Field and Description |
|---|---|
protected NamedCache |
m_cache
The cache to query from.
|
protected boolean |
m_fByMember
Differentiates between by-member and by-partition iteration.
|
protected PartitionedFilter |
m_filter
The filter to query with.
|
protected boolean |
m_fRandom
An option to randomize the order of iteration to avoid harmonics in a clustered environment.
|
protected PartitionSet |
m_setPids
The remaining set of partitions to iterate.
|
static int |
OPT_BY_MEMBER
An option to iterate one member at a time.
|
static int |
OPT_BY_PARTITION
An option to iterate one partition at a time.
|
static int |
OPT_RANDOMIZED
An option to iterate the members or partitions in a randomized order.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPartitionedIterator(Filter filter, NamedCache cache, PartitionSet setPids)
Create AbstractPartitionedIterator instance.
|
protected |
AbstractPartitionedIterator(Filter filter, NamedCache cache, PartitionSet setPids, boolean fByMember, boolean fRandom)
Create AbstractPartitionedIterator instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advance()
Advance to the next object.
|
protected abstract Iterable<T> |
nextIterable(PartitionedFilter filter)
Obtain the next Iterable for a given filter.
|
protected void |
remove(Object oPrev)
Remove the specified item.
|
getPrevious, hasMoreElements, hasNext, next, nextElement, remove, setNextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic static final int OPT_BY_PARTITION
public static final int OPT_BY_MEMBER
public static final int OPT_RANDOMIZED
protected NamedCache m_cache
protected PartitionedFilter m_filter
protected PartitionSet m_setPids
protected boolean m_fByMember
protected boolean m_fRandom
protected AbstractPartitionedIterator(Filter filter, NamedCache cache, PartitionSet setPids)
cache - the cache to queryfilter - the query expressed as a FiltersetPids - the partitions to execute the query againstprotected AbstractPartitionedIterator(Filter filter, NamedCache cache, PartitionSet setPids, boolean fByMember, boolean fRandom)
cache - the cache to queryfilter - the query expressed as a FiltersetPids - the partitions to execute the query againstprotected abstract Iterable<T> nextIterable(PartitionedFilter filter)
filter - filter to useprotected void advance()
com.oracle.common.collections.AbstractStableIteratorThis method must be implemented by the concrete sub-class by calling AbstractStableIterator.setNext(T) if there is a next object.
advance in class com.oracle.common.collections.AbstractStableIterator<T>protected void remove(Object oPrev)
com.oracle.common.collections.AbstractStableIteratorThis is an optional operation. If the Iterator supports element removal, then it should implement this method, which is delegated to by the AbstractStableIterator.remove() method.
remove in class com.oracle.common.collections.AbstractStableIterator<T>oPrev - the previously iterated object that should be removed