Class ReadOnlySegmentAwareEntryCollection<K,​V>

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<K,​V>>, java.util.Collection<java.util.Map.Entry<K,​V>>

    public class ReadOnlySegmentAwareEntryCollection<K,​V>
    extends ReadOnlySegmentAwareCollection<java.util.Map.Entry<K,​V>>
    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 specifically with the ReadOnlySegmentAwareEntryCollection to properly filter the entry by the key instead of the entry instance itself.

    Since:
    7.2
    Author:
    wburns
    • Constructor Detail

      • ReadOnlySegmentAwareEntryCollection

        public ReadOnlySegmentAwareEntryCollection​(java.util.Set<java.util.Map.Entry<K,​V>> set,
                                                   ConsistentHash ch,
                                                   IntSet allowedSegments)
    • Method Detail

      • iterator

        public java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()
        Specified by:
        iterator in interface java.util.Collection<K>
        Specified by:
        iterator in interface java.lang.Iterable<K>
        Overrides:
        iterator in class ReadOnlySegmentAwareCollection<java.util.Map.Entry<K,​V>>