Class ReadOnlySegmentAwareCollection<E>

  • All Implemented Interfaces:
    Iterable<E>, Collection<E>
    Direct Known Subclasses:
    ReadOnlySegmentAwareEntryCollection

    public class ReadOnlySegmentAwareCollection<E>
    extends AbstractDelegatingCollection<E>
    Set implementation that shows a read only view of the provided set by only allowing entries that map to a given segment using the provided consistent hash.

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

    Note many operations are not constant time when using this set. Please check the method you are using to see if it will perform differently than normally expected.

    Since:
    7.2
    Author:
    wburns