Class ReadOnlySegmentAwareMap<K,V>

java.lang.Object
org.infinispan.commons.util.AbstractDelegatingMap<K,V>
org.infinispan.distribution.util.ReadOnlySegmentAwareMap<K,V>
All Implemented Interfaces:
Map<K,V>

public class ReadOnlySegmentAwareMap<K,V> extends AbstractDelegatingMap<K,V>
Map implementation that shows a read only view of the provided entry by only allowing entries whose key maps to a given segment using the provided consistent hash.

Any operation that would modify this map will throw an UnsupportedOperationException

This map is useful when you don't want to copy an entire map but only need to see entries from the given segments.

Note many operations are not constant time when using this map. The values() method is not supported as well. Please check\ the method you are using to see if it will perform differently than normally expected.

Since:
7.2
Author:
wburns