Package com.tangosol.net.partition
Class PartitionSplittingBackingMap.PartitionedIterator
- java.lang.Object
-
- com.oracle.coherence.common.collections.AbstractStableIterator
-
- com.tangosol.net.partition.PartitionSplittingBackingMap.PartitionedIterator
-
- All Implemented Interfaces:
Enumeration
,Iterator
- Enclosing class:
- PartitionSplittingBackingMap
public class PartitionSplittingBackingMap.PartitionedIterator extends com.oracle.coherence.common.collections.AbstractStableIterator
An Iterator designed to ensure that a stable copy of each partition's keys is available for the duration of the iteration over its keys.This is primarily intended for use with the BinaryMap, which does not provide thread-safe iterators if the BinaryMap continues to be modified while the iteration is occurring.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PartitionedIterator(Map[] amap)
Construct PartitionedIterator based on the specified array of maps, where each map contains data for one and only one partition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
advance()
Advance to the next object.protected void
remove(Object oPrev)
Remove the specified item.-
Methods inherited from class com.oracle.coherence.common.collections.AbstractStableIterator
getPrevious, hasMoreElements, hasNext, next, nextElement, remove, setNext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
PartitionedIterator
protected PartitionedIterator(Map[] amap)
Construct PartitionedIterator based on the specified array of maps, where each map contains data for one and only one partition.- Parameters:
amap
- an array of underlying maps
-
-
Method Detail
-
advance
protected void advance()
Advance to the next object.This method must be implemented by the concrete sub-class by calling
AbstractStableIterator.setNext(T)
if there is a next object.- Specified by:
advance
in classcom.oracle.coherence.common.collections.AbstractStableIterator
-
remove
protected void remove(Object oPrev)
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 classcom.oracle.coherence.common.collections.AbstractStableIterator
- Parameters:
oPrev
- the previously iterated object that should be removed
-
-