Class SegmentedEvictableDataContainer<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.SegmentedEvictableDataContainer<K,V>
Type Parameters:
K - the container key type
V - 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 SegmentedEvictableDataContainer<K,V> extends org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
Copy 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.EntryIterator

    Nested 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, shouldStopSegments

    Fields inherited from class org.infinispan.container.impl.AbstractInternalDataContainer

    configuration, entryFactory, evictionManager, expirationManager, keyPartitioner, listeners, orderer, passivator, timeService
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    void
     
    void
     
    void
    clear(org.infinispan.commons.util.IntSet segments)
     
    protected void
    computeEntryRemoved(K key, org.infinispan.container.entries.InternalCacheEntry<K,V> value)
     
    protected void
    computeEntryWritten(K key, org.infinispan.container.entries.InternalCacheEntry<K,V> value)
     
    long
     
    org.infinispan.container.entries.InternalCacheEntry<K,V>
     
    org.infinispan.container.impl.PeekableTouchableMap<K,V>
    getMapForSegment(int segment)
     
    Iterator<org.infinispan.container.entries.InternalCacheEntry<K,V>>
     
    Iterator<org.infinispan.container.entries.InternalCacheEntry<K,V>>
    iteratorIncludingExpired(org.infinispan.commons.util.IntSet segments)
     
    org.infinispan.container.entries.InternalCacheEntry<K,V>
     
    protected void
    putEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K,V> map, int segment, K key, org.infinispan.container.entries.InternalCacheEntry<K,V> entry)
     
    protected org.infinispan.container.entries.InternalCacheEntry<K,V>
    removeEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K,V> map, int segment, Object key)
     
    void
    removeSegments(org.infinispan.commons.util.IntSet segments)
     
    void
    resize(long newSize)
     
    int
     
    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, forEach, forEachSegment, getSegmentForKey, iterator, iterator, publisher, publisher, sizeIncludingExpired, spliterator, spliterator, start, stop

    Methods inherited from class org.infinispan.container.impl.AbstractInternalDataContainer

    addRemovalListener, applyListener, compute, compute, containsKey, containsKey, entryAdded, entryRemoved, entryUpdated, evict, evict, expiredIterationPredicate, filterExpiredEntries, get, handleEviction, hasExpirable, peek, put, put, remove, remove, removeRemovalListener, segmentRemoved, touch

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.infinispan.container.DataContainer

    size

    Methods inherited from interface org.infinispan.container.impl.InternalDataContainer

    size

    Methods inherited from interface Iterable

    forEach
  • Method Details

    • computeEntryWritten

      protected void computeEntryWritten(K key, org.infinispan.container.entries.InternalCacheEntry<K,V> value)
      Overrides:
      computeEntryWritten in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • computeEntryRemoved

      protected void computeEntryRemoved(K key, org.infinispan.container.entries.InternalCacheEntry<K,V> value)
      Overrides:
      computeEntryRemoved in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • putEntryInMap

      protected void putEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K,V> map, int segment, K key, org.infinispan.container.entries.InternalCacheEntry<K,V> entry)
      Overrides:
      putEntryInMap in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • removeEntryInMap

      protected org.infinispan.container.entries.InternalCacheEntry<K,V> removeEntryInMap(org.infinispan.container.impl.PeekableTouchableMap<K,V> map, int segment, Object key)
      Overrides:
      removeEntryInMap in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • getMapForSegment

      public org.infinispan.container.impl.PeekableTouchableMap<K,V> getMapForSegment(int segment)
      Overrides:
      getMapForSegment in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • get

      public org.infinispan.container.entries.InternalCacheEntry<K,V> get(Object k)
      Specified by:
      get in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      get in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • peek

      public org.infinispan.container.entries.InternalCacheEntry<K,V> peek(Object k)
      Specified by:
      peek in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      peek in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • clear

      public void clear()
      Specified by:
      clear in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      clear in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • clear

      public void clear(org.infinispan.commons.util.IntSet segments)
      Specified by:
      clear in interface org.infinispan.container.impl.InternalDataContainer<K,V>
      Overrides:
      clear in class org.infinispan.container.impl.AbstractInternalDataContainer<K,V>
    • iteratorIncludingExpired

      public Iterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> iteratorIncludingExpired()
      Specified by:
      iteratorIncludingExpired in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      iteratorIncludingExpired in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • iteratorIncludingExpired

      public Iterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> iteratorIncludingExpired(org.infinispan.commons.util.IntSet segments)
      Specified by:
      iteratorIncludingExpired in interface org.infinispan.container.impl.InternalDataContainer<K,V>
      Overrides:
      iteratorIncludingExpired in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • spliteratorIncludingExpired

      public Spliterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> spliteratorIncludingExpired()
      Specified by:
      spliteratorIncludingExpired in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      spliteratorIncludingExpired in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • spliteratorIncludingExpired

      public Spliterator<org.infinispan.container.entries.InternalCacheEntry<K,V>> spliteratorIncludingExpired(org.infinispan.commons.util.IntSet segments)
      Specified by:
      spliteratorIncludingExpired in interface org.infinispan.container.impl.InternalDataContainer<K,V>
      Overrides:
      spliteratorIncludingExpired in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • sizeIncludingExpired

      public int sizeIncludingExpired()
      Specified by:
      sizeIncludingExpired in interface org.infinispan.container.DataContainer<K,V>
      Overrides:
      sizeIncludingExpired in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • removeSegments

      public void removeSegments(org.infinispan.commons.util.IntSet segments)
      Specified by:
      removeSegments in interface org.infinispan.container.impl.InternalDataContainer<K,V>
      Overrides:
      removeSegments in class org.infinispan.container.impl.DefaultSegmentedDataContainer<K,V>
    • capacity

      public long capacity()
    • resize

      public void resize(long newSize)
    • evictionSize

      public long evictionSize()
    • cleanUp

      public void cleanUp()