public class OffHeapDataContainer extends AbstractInternalDataContainer<WrappedBytes,WrappedBytes>
AbstractInternalDataContainer.EntryIterator
DataContainer.ComputeAction<K,V>
Modifier and Type | Field and Description |
---|---|
protected OffHeapMemoryAllocator |
allocator |
protected OffHeapEntryFactory |
offHeapEntryFactory |
configuration, entryFactory, evictionManager, expirationManager, keyPartitioner, listeners, orderer, passivator, timeService
Constructor and Description |
---|
OffHeapDataContainer() |
addRemovalListener, applyListener, clear, compute, compute, computeEntryRemoved, computeEntryWritten, containsKey, containsKey, evict, evict, expiredIterationPredicate, filterExpiredEntries, get, get, handleEviction, peek, peek, put, put, remove, remove, removeRemovalListener, touch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanUp, forEach, publisher, size, sizeIncludingExpired
capacity, evictionSize, resize, size
protected OffHeapMemoryAllocator allocator
protected OffHeapEntryFactory offHeapEntryFactory
public void start()
public void stop()
protected PeekableTouchableMap<WrappedBytes,WrappedBytes> getMapForSegment(int segment)
getMapForSegment
in class AbstractInternalDataContainer<WrappedBytes,WrappedBytes>
protected int getSegmentForKey(Object key)
getSegmentForKey
in class AbstractInternalDataContainer<WrappedBytes,WrappedBytes>
public Spliterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> spliterator()
DataContainer
This spliterator only returns entries that are not expired, however it will not remove them while doing so.
public Spliterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> spliterator(IntSet segments)
InternalDataContainer
DataContainer.spliterator()
except that only entries that map to the provided segments are
returned via this spliterator. The spliterator will not return expired entries.segments
- segments of entries to returnpublic Spliterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> spliteratorIncludingExpired()
DataContainer
DataContainer.spliterator()
except that is also returns expired entries.public Spliterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> spliteratorIncludingExpired(IntSet segments)
InternalDataContainer
DataContainer.spliteratorIncludingExpired()
except that only entries that map to the provided
segments are returned via this spliterator. The spliterator will return expired entries as well.segments
- segments of entries to usepublic Iterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> iterator()
DataContainer
This iterator only returns entries that are not expired, however it will not remove them while doing so.
public Iterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> iterator(IntSet segments)
InternalDataContainer
DataContainer.iterator()
except that only entries that map to the provided segments are
returned via the iterator. The iterator will not return expired entries.segments
- segments of entries to usepublic Iterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> iteratorIncludingExpired()
DataContainer
DataContainer.iterator()
except that is also returns expired entries.public Iterator<InternalCacheEntry<WrappedBytes,WrappedBytes>> iteratorIncludingExpired(IntSet segments)
InternalDataContainer
DataContainer.iteratorIncludingExpired()
except that only entries that map to the provided
segments are returned via the iterator. The iterator can return expired entries.segments
- segments of entries to usepublic void addSegments(IntSet segments)
InternalDataContainer
segments
- segments to associate with this containerpublic void removeSegments(IntSet segments)
InternalDataContainer
InternalDataContainer.addRemovalListener(Consumer)
of entries that were removed due to no longer being associated with this
container. There is no guarantee if the consumer is invoked once or multiple times for a given group of segments
and could be in any order.
When this method is invoked an implementation is free to remove any entries that don't map to segments currently
associated with this container. Note that entries that were removed due to their segments never being associated
with this container do not notify listeners registered via InternalDataContainer.addRemovalListener(Consumer)
.
segments
- segments that should no longer be associated with this containerpublic int sizeIncludingExpired()
public void clear()
DataContainer
Copyright © 2021 JBoss by Red Hat. All rights reserved.