Class PartitionedIterator<T>

java.lang.Object
com.oracle.coherence.common.collections.AbstractStableIterator<T>
com.tangosol.net.partition.AbstractPartitionedIterator<T>
com.tangosol.net.partition.PartitionedIterator<T>
All Implemented Interfaces:
Enumeration<T>, Iterator<T>

public class PartitionedIterator<T> extends AbstractPartitionedIterator<T>
An Iterator that iterates over keys in a partition-by-partition or member-by-member manner.
Since:
Coherence 3.5
Author:
cp 2009.04.07
  • Field Details

    • OPT_KEYS

      public static final int OPT_KEYS
      An option to iterate the Map keys. This is the default.
      See Also:
    • OPT_ENTRIES

      public static final int OPT_ENTRIES
      An option to iterate Map Entry objects.
      See Also:
    • m_fKeysOnly

      protected boolean m_fKeysOnly
      Differentiates between a key iterator (true) and an entry iterator (false).
  • Constructor Details

    • PartitionedIterator

      public PartitionedIterator(NamedCache cache, Filter filter, PartitionSet setPids, int nOptions)
      Construct PartitionedIterator that will provide iteration of the keys of the specified cache using the specified filter, but will only query one partition or one member at a time.
      Parameters:
      cache - the cache to query
      filter - the query expressed as a Filter
      setPids - the partitions to execute the query against
      nOptions - pass a bit-or'd combination of any of the OPT_* constants
  • Method Details

    • nextIterable

      protected Iterable<T> nextIterable(PartitionedFilter filter)
      Description copied from class: AbstractPartitionedIterator
      Obtain the next Iterable for a given filter. This method is called when the Iterable returned by the previous call is exhausted.
      Specified by:
      nextIterable in class AbstractPartitionedIterator<T>
      Parameters:
      filter - filter to use
      Returns:
      a next Iterable or null if there is no more data to iterate
    • remove

      protected void remove(Object oPrev)
      Description copied from class: com.oracle.coherence.common.collections.AbstractStableIterator
      Remove the specified item.

      This 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.

      Overrides:
      remove in class AbstractPartitionedIterator<T>
      Parameters:
      oPrev - the previously iterated object that should be removed