Package org.infinispan
Interface CacheCollection<E>
- Type Parameters:
E
- The type of the collection
- All Superinterfaces:
CloseableIteratorCollection<E>
,Collection<E>
,Iterable<E>
- All Known Subinterfaces:
CacheSet<E>
- All Known Implementing Classes:
AbstractCacheBackedSet
,CacheBackedEntrySet
,CacheBackedKeySet
,CacheSetMapper
,InternalCacheSet
,SimpleCacheImpl.CacheEntrySet
,SimpleCacheImpl.EntrySet
,SimpleCacheImpl.EntrySetBase
,SimpleCacheImpl.KeySet
,SimpleCacheImpl.Values
,WriteableCacheCollectionMapper
,WriteableCacheSetMapper
A collection type that returns special Cache based streams that have additional options to tweak behavior.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.reactivestreams.Publisher
<E> localPublisher
(int segment) Returns a publisher that will publish all elements that map to the given segment.default org.reactivestreams.Publisher
<E> localPublisher
(IntSet segments) Returns a publisher that will publish all elements that map to the given segment.stream()
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
iterator, spliterator
-
Method Details
-
stream
CacheStream<E> stream()Description copied from interface:CloseableIteratorCollection
This stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
stream
in interfaceCloseableIteratorCollection<E>
- Specified by:
stream
in interfaceCollection<E>
-
parallelStream
CacheStream<E> parallelStream()Description copied from interface:CloseableIteratorCollection
This stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
parallelStream
in interfaceCloseableIteratorCollection<E>
- Specified by:
parallelStream
in interfaceCollection<E>
-
localPublisher
Returns 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.- Parameters:
segment
- the segment that all published elements belong to- Returns:
- Publisher that will publish the elements for the given segment
-
localPublisher
Returns 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.- Parameters:
segments
- the segments that all published elements belong to- Returns:
- Publisher that will publish the elements for the given segments
-