Package org.infinispan.cache.impl
Class AbstractCacheBackedSet<K,V,E>
java.lang.Object
org.infinispan.cache.impl.AbstractCacheBackedSet<K,V,E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>,CacheCollection<E>,CacheSet<E>,CloseableIteratorCollection<E>,CloseableIteratorSet<E>
- Direct Known Subclasses:
CacheBackedEntrySet,CacheBackedKeySet
Entry or key set backed by a cache.
- Since:
- 13.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCacheBackedSet(CacheImpl<K, V> cache, Object lockOwner, long explicitFlags) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdding new cache entries via a set is not allowed.booleanaddAll(Collection<? extends E> c) Adding new cache entries via a set is not allowed.voidclear()abstract booleanbooleancontainsAll(Collection<?> c) protected ContextBuilderprotected abstract ObjectextractKey(Object e) Extract the key from a set element.voidbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()stream()Object[]toArray()<T> T[]toArray(T[] a) toString()protected abstract EwrapElement(E e) Wrap the element if neededMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.CacheCollection
localPublisher, localPublisherMethods inherited from interface java.util.Collection
toArray
-
Field Details
-
cache
-
lockOwner
-
explicitFlags
protected final long explicitFlags
-
-
Constructor Details
-
AbstractCacheBackedSet
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
Description 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
-
forEach
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
Adding new cache entries via a set is not allowed.Please use
BasicCache.put(Object, Object)etc. -
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>- Specified by:
containsAllin interfaceSet<K>
-
addAll
Adding new cache entries via a set is not allowed.Please use
BasicCache.put(Object, Object)etc. -
removeAll
-
removeIf
- Specified by:
removeIfin interfaceCollection<K>
-
retainAll
-
clear
public void clear() -
spliterator
Description 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 interfaceCloseableIteratorCollection<K>- Specified by:
spliteratorin interfaceCloseableIteratorSet<K>- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceSet<K>
-
stream
Description 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 interfaceCacheCollection<K>- Specified by:
streamin interfaceCloseableIteratorCollection<K>- Specified by:
streamin interfaceCollection<K>
-
parallelStream
Description 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 interfaceCacheCollection<K>- Specified by:
parallelStreamin interfaceCloseableIteratorCollection<K>- Specified by:
parallelStreamin interfaceCollection<K>
-
toString
-
decoratedWriteContextBuilder
-
entryToKeyFunction
-
extractKey
Extract the key from a set element. -
wrapElement
Wrap the element if needed
-