Package org.infinispan.distribution.util
Class ReadOnlySegmentAwareEntryCollection<K,V>
- java.lang.Object
-
- org.infinispan.commons.util.AbstractDelegatingCollection<E>
-
- org.infinispan.distribution.util.ReadOnlySegmentAwareCollection<java.util.Map.Entry<K,V>>
-
- org.infinispan.distribution.util.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
-
-
Field Summary
-
Fields inherited from class org.infinispan.distribution.util.ReadOnlySegmentAwareCollection
allowedSegments, ch, set
-
-
Constructor Summary
Constructors Constructor Description ReadOnlySegmentAwareEntryCollection(java.util.Set<java.util.Map.Entry<K,V>> set, ConsistentHash ch, IntSet allowedSegments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<java.util.Map.Entry<K,V>>
iterator()
protected boolean
valueAllowed(java.lang.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
-
-
-
-
Constructor Detail
-
ReadOnlySegmentAwareEntryCollection
public ReadOnlySegmentAwareEntryCollection(java.util.Set<java.util.Map.Entry<K,V>> set, ConsistentHash ch, IntSet allowedSegments)
-
-
Method Detail
-
valueAllowed
protected boolean valueAllowed(java.lang.Object obj)
- Overrides:
valueAllowed
in classReadOnlySegmentAwareCollection<java.util.Map.Entry<K,V>>
-
-