Package org.infinispan.distribution.util
Class ReadOnlySegmentAwareIterator<E>
- java.lang.Object
-
- org.infinispan.distribution.util.ReadOnlySegmentAwareIterator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
- Direct Known Subclasses:
ReadOnlySegmentAwareEntryIterator
public class ReadOnlySegmentAwareIterator<E> extends java.lang.Object implements java.util.Iterator<E>Iterator implementation that shows a read only view of the provided iterator by only allowing values that map to a given segment using the provided consistent hash.This iterator is used with the other various SegmentAware Collections such as
ReadOnlySegmentAwareCollection- Since:
- 7.2
- Author:
- wburns
-
-
Field Summary
Fields Modifier and Type Field Description protected IntSetallowedSegmentsprotected ConsistentHashchprotected java.util.Iterator<E>iterprotected Enext
-
Constructor Summary
Constructors Constructor Description ReadOnlySegmentAwareIterator(java.util.Iterator<E> iter, ConsistentHash ch, IntSet allowedSegments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EfindNext()booleanhasNext()Enext()voidremove()protected booleanvalueAllowed(java.lang.Object obj)
-
-
-
Field Detail
-
iter
protected final java.util.Iterator<E> iter
-
ch
protected final ConsistentHash ch
-
allowedSegments
protected final IntSet allowedSegments
-
next
protected E next
-
-
Constructor Detail
-
ReadOnlySegmentAwareIterator
public ReadOnlySegmentAwareIterator(java.util.Iterator<E> iter, ConsistentHash ch, IntSet allowedSegments)
-
-