Package org.infinispan
Interface CacheCollection<E>
- Type Parameters:
E
- The type of the collection
- All Superinterfaces:
org.infinispan.commons.util.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
,ValueCacheCollection
,WriteableCacheCollectionMapper
,WriteableCacheSetMapper
public interface CacheCollection<E>
extends org.infinispan.commons.util.CloseableIteratorCollection<E>
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
(org.infinispan.commons.util.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()- Specified by:
stream
in interfaceorg.infinispan.commons.util.CloseableIteratorCollection<E>
- Specified by:
stream
in interfaceCollection<E>
-
parallelStream
CacheStream<E> parallelStream()- Specified by:
parallelStream
in interfaceorg.infinispan.commons.util.CloseableIteratorCollection<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
@Experimental default org.reactivestreams.Publisher<E> localPublisher(org.infinispan.commons.util.IntSet segments) 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
-