Package org.infinispan.distribution.util
Class ReadOnlySegmentAwareEntryCollection<K,V>
- java.lang.Object
-
- org.infinispan.commons.util.AbstractDelegatingCollection<E>
-
- org.infinispan.distribution.util.ReadOnlySegmentAwareCollection<Map.Entry<K,V>>
-
- org.infinispan.distribution.util.ReadOnlySegmentAwareEntryCollection<K,V>
-
- All Implemented Interfaces:
Iterable<Map.Entry<K,V>>
,Collection<Map.Entry<K,V>>
public class ReadOnlySegmentAwareEntryCollection<K,V> extends ReadOnlySegmentAwareCollection<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
-
-
Field Summary
-
Fields inherited from class org.infinispan.distribution.util.ReadOnlySegmentAwareCollection
allowedSegments, ch, set
-
-
Constructor Summary
Constructors Constructor Description ReadOnlySegmentAwareEntryCollection(Set<Map.Entry<K,V>> set, ConsistentHash ch, IntSet allowedSegments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Map.Entry<K,V>>
iterator()
protected boolean
valueAllowed(Object obj)
-
Methods inherited from class org.infinispan.distribution.util.ReadOnlySegmentAwareCollection
contains, containsAll, delegate, isEmpty, size
-
Methods inherited from class org.infinispan.commons.util.AbstractDelegatingCollection
add, addAll, clear, forEach, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, toArray
-
-
-
-
Method Detail
-
valueAllowed
protected boolean valueAllowed(Object obj)
- Overrides:
valueAllowed
in classReadOnlySegmentAwareCollection<Map.Entry<K,V>>
-
-