Class EvictableDataContainer<K,V>
java.lang.Object
org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
org.wildfly.clustering.cache.infinispan.embedded.container.EvictableDataContainer<K,V>
- Type Parameters:
K- the container key typeV- the container value type
- All Implemented Interfaces:
Iterable<org.infinispan.container.entries.InternalCacheEntry<K,V>>, org.infinispan.container.DataContainer<K, V>, org.infinispan.container.impl.InternalDataContainer<K, V>
public class EvictableDataContainer<K,V>
extends org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
A enhanced version of
BoundedSegmentedDataContainer with support for selective and time-based eviction.
Unfortunately, due to inflexible constructors and package protected fields, we cannot simply extend BoundedSegmentedDataContainer.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from class org.infinispan.container.impl.AbstractInternalDataContainer
org.infinispan.container.impl.AbstractInternalDataContainer.EntryIteratorNested classes/interfaces inherited from interface org.infinispan.container.DataContainer
org.infinispan.container.DataContainer.ComputeAction<K,V> -
Field Summary
Fields inherited from class org.infinispan.container.impl.DefaultSegmentedDataContainer
maps, mapSupplier, shouldStopSegmentsFields inherited from class org.infinispan.container.impl.AbstractInternalDataContainer
configuration, entryFactory, evictionManager, expirationManager, keyPartitioner, listeners, orderer, passivator, timeService -
Method Summary
Modifier and TypeMethodDescriptionlongcapacity()voidcleanUp()voidclear()voidclear(org.infinispan.commons.util.IntSet segments) protected voidcomputeEntryRemoved(K key, org.infinispan.container.entries.InternalCacheEntry<K, V> value) protected voidcomputeEntryWritten(K key, org.infinispan.container.entries.InternalCacheEntry<K, V> value) longvoidforEach(org.infinispan.commons.util.IntSet segments, Consumer<? super org.infinispan.container.entries.InternalCacheEntry<K, V>> action) getMapForSegment(int segment) intgetSegmentForKey(Object key) iterator(org.infinispan.commons.util.IntSet segments) iteratorIncludingExpired(org.infinispan.commons.util.IntSet segments) publisher(int segment) publisher(org.infinispan.commons.util.IntSet segments) protected voidputEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K, V> map, int segment, K key, org.infinispan.container.entries.InternalCacheEntry<K, V> ice) removeEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K, V> map, int segment, Object key) voidremoveSegments(org.infinispan.commons.util.IntSet segments) voidresize(long newSize) intsize(org.infinispan.commons.util.IntSet segments) intintsizeIncludingExpired(org.infinispan.commons.util.IntSet segment) Spliterator<org.infinispan.container.entries.InternalCacheEntry<K, V>> spliterator(org.infinispan.commons.util.IntSet segments) Spliterator<org.infinispan.container.entries.InternalCacheEntry<K, V>> Spliterator<org.infinispan.container.entries.InternalCacheEntry<K, V>> spliteratorIncludingExpired(org.infinispan.commons.util.IntSet segments) Methods inherited from class org.infinispan.container.impl.DefaultSegmentedDataContainer
addSegments, forEachSegment, iterator, spliterator, start, stopMethods inherited from class org.infinispan.container.impl.AbstractInternalDataContainer
addRemovalListener, applyListener, compute, compute, containsKey, containsKey, entryAdded, entryRemoved, entryUpdated, evict, evict, expiredIterationPredicate, filterExpiredEntries, handleEviction, hasExpirable, put, put, remove, remove, removeRemovalListener, segmentRemoved, touchMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.container.DataContainer
size
-
Method Details
-
getSegmentForKey
-
computeEntryWritten
-
computeEntryRemoved
-
putEntryInMap
-
removeEntryInMap
-
getMapForSegment
-
get
-
get
-
peek
-
peek
-
publisher
-
publisher
-
iterator
-
spliterator
public Spliterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> spliterator(org.infinispan.commons.util.IntSet segments) -
size
public int size(org.infinispan.commons.util.IntSet segments) -
sizeIncludingExpired
-
forEach
-
clear
-
clear
-
iteratorIncludingExpired
-
iteratorIncludingExpired
-
spliteratorIncludingExpired
public Spliterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> spliteratorIncludingExpired() -
spliteratorIncludingExpired
public Spliterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> spliteratorIncludingExpired(org.infinispan.commons.util.IntSet segments) -
sizeIncludingExpired
-
removeSegments
-
capacity
public long capacity() -
resize
public void resize(long newSize) -
evictionSize
public long evictionSize() -
cleanUp
public void cleanUp()
-