Package org.infinispan.util
Class CacheSetMapper<E,R>
java.lang.Object
java.util.AbstractCollection<R>
org.infinispan.util.CollectionMapper<E,R>
org.infinispan.util.SetMapper<E,R>
org.infinispan.util.CacheSetMapper<E,R>
- All Implemented Interfaces:
Iterable<R>
,Collection<R>
,Set<R>
,CacheCollection<R>
,CacheSet<R>
,CloseableIteratorCollection<R>
,CloseableIteratorSet<R>
A
CacheSet
that allows for a different set to be mapped as a different instance wtih values replaced on
request. This is useful as a cache set is normally lazily evaluated to prevent having to pull all values into memory
which can be a lot faster when checking single values and can also prevent out of memory issues.- Since:
- 9.0
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.util.CollectionMapper
mapper, realCollection
-
Constructor Summary
-
Method Summary
Methods inherited from class org.infinispan.util.CollectionMapper
add, addAll, clear, forEach, isEmpty, remove, removeAll, retainAll, size
Methods inherited from class java.util.AbstractCollection
contains, containsAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.CacheCollection
localPublisher, localPublisher
Methods inherited from interface java.util.Collection
removeIf, toArray
-
Field Details
-
realSet
-
-
Constructor Details
-
CacheSetMapper
-
-
Method Details
-
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 interfaceCacheCollection<E>
- Specified by:
stream
in interfaceCloseableIteratorCollection<E>
- Specified by:
stream
in interfaceCollection<E>
- Overrides:
stream
in classCollectionMapper<E,
R>
-
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 interfaceCacheCollection<E>
- Specified by:
parallelStream
in interfaceCloseableIteratorCollection<E>
- Specified by:
parallelStream
in interfaceCollection<E>
- Overrides:
parallelStream
in classCollectionMapper<E,
R>
-
spliterator
Description copied from interface:CloseableIteratorCollection
This spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
spliterator
in interfaceCloseableIteratorCollection<E>
- Specified by:
spliterator
in interfaceCloseableIteratorSet<E>
- Specified by:
spliterator
in interfaceCollection<E>
- Specified by:
spliterator
in interfaceIterable<E>
- Specified by:
spliterator
in interfaceSet<E>
- Overrides:
spliterator
in classCollectionMapper<E,
R>
-
iterator
Description copied from interface:CloseableIteratorCollection
This iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly
-