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>,org.infinispan.commons.util.CloseableIteratorCollection<E>,org.infinispan.commons.util.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()org.infinispan.commons.util.CloseableIterator<E> iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()org.infinispan.commons.util.CloseableSpliterator<E> 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
-
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
- Specified by:
spliteratorin interfaceorg.infinispan.commons.util.CloseableIteratorCollection<K>- Specified by:
spliteratorin interfaceorg.infinispan.commons.util.CloseableIteratorSet<K>- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceSet<K>
-
stream
- Specified by:
streamin interfaceCacheCollection<K>- Specified by:
streamin interfaceorg.infinispan.commons.util.CloseableIteratorCollection<K>- Specified by:
streamin interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStreamin interfaceCacheCollection<K>- Specified by:
parallelStreamin interfaceorg.infinispan.commons.util.CloseableIteratorCollection<K>- Specified by:
parallelStreamin interfaceCollection<K>
-
toString
-
decoratedWriteContextBuilder
-
entryToKeyFunction
-
extractKey
Extract the key from a set element. -
wrapElement
Wrap the element if needed
-