Class InternalCacheSet<E>
- Type Parameters:
- E- The element type
- All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- Set<E>,- CacheCollection<E>,- CacheSet<E>,- CloseableIteratorCollection<E>,- CloseableIteratorSet<E>
It extends CacheSet because that's what interceptors used return for
 KeySetCommand and EntrySetCommand,
 but because these classes are only used internally, we can avoid implementing most of the methods.
Subclasses only need to implement localPublisher(IntSet) and localPublisher(int),
 and a facade class like CacheBackedKeySet implements the rest of the
 CacheSet methods.
- Since:
- 14.0
- Author:
- Dan Berindei
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanfinal booleanaddAll(Collection<? extends E> c) final voidclear()final booleanfinal booleancontainsAll(Collection<?> c) final voidfinal booleanisEmpty()final CloseableIterator<E> iterator()abstract org.reactivestreams.Publisher<E> localPublisher(int segment) Returns a publisher that will publish all elements that map to the given segment.abstract org.reactivestreams.Publisher<E> localPublisher(IntSet segments) Returns a publisher that will publish all elements that map to the given segment.final CacheStream<E> final booleanfinal booleanremoveAll(Collection<?> c) final booleanfinal booleanretainAll(Collection<?> c) final intsize()final CloseableSpliterator<E> final CacheStream<E> stream()final Object[]toArray()final <T> T[]toArray(T[] a) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.CollectiontoArray
- 
Constructor Details- 
InternalCacheSetpublic InternalCacheSet()
 
- 
- 
Method Details- 
localPublisherDescription copied from interface:CacheCollectionReturns a publisher that will publish all elements that map to the given segment. Note this publisher may require going remotely to retrieve elements depending on the underlying configuration and flags applied to the original Cache used to create this CacheCollection.- Specified by:
- localPublisherin interface- CacheCollection<E>
- Parameters:
- segment- the segment that all published elements belong to
- Returns:
- Publisher that will publish the elements for the given segment
 
- 
localPublisherDescription copied from interface:CacheCollectionReturns a publisher that will publish all elements that map to the given segment. Note this publisher may require going remotely to retrieve elements depending on the underlying configuration and flags applied to the original Cache used to create this CacheCollection.- Specified by:
- localPublisherin interface- CacheCollection<E>
- Parameters:
- segments- the segments that all published elements belong to
- Returns:
- Publisher that will publish the elements for the given segments
 
- 
removeIf- Specified by:
- removeIfin interface- Collection<E>
 
- 
forEach
- 
iteratorDescription copied from interface:CloseableIteratorCollectionThis iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly 
- 
spliteratorDescription copied from interface:CloseableIteratorCollectionThis spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- spliteratorin interface- CloseableIteratorCollection<E>
- Specified by:
- spliteratorin interface- CloseableIteratorSet<E>
- Specified by:
- spliteratorin interface- Collection<E>
- Specified by:
- spliteratorin interface- Iterable<E>
- Specified by:
- spliteratorin interface- Set<E>
 
- 
streamDescription copied from interface:CloseableIteratorCollectionThis stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- streamin interface- CacheCollection<E>
- Specified by:
- streamin interface- CloseableIteratorCollection<E>
- Specified by:
- streamin interface- Collection<E>
 
- 
parallelStreamDescription copied from interface:CloseableIteratorCollectionThis stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- parallelStreamin interface- CacheCollection<E>
- Specified by:
- parallelStreamin interface- CloseableIteratorCollection<E>
- Specified by:
- parallelStreamin interface- Collection<E>
 
- 
sizepublic final int size()
- 
isEmptypublic final boolean isEmpty()
- 
contains
- 
toArray
- 
toArraypublic final <T> T[] toArray(T[] a) 
- 
add
- 
remove
- 
containsAll- Specified by:
- containsAllin interface- Collection<E>
- Specified by:
- containsAllin interface- Set<E>
 
- 
addAll
- 
removeAll
- 
retainAll
- 
clearpublic final void clear()
 
-