public class L1SegmentedDataContainer<K,V> extends DefaultSegmentedDataContainer<K,V>
If the segment is owned, only the owner segment is used. If the segment is not owned it will query the temporary map to see if the object is stored there.
AbstractInternalDataContainer.EntryIteratorDataContainer.ComputeAction<K,V>maps, mapSupplier, notExpiredPredicate, shouldStopSegmentsconfiguration, entryFactory, evictionManager, expirationManager, keyPartitioner, listeners, orderer, passivator, timeService| Constructor and Description |
|---|
L1SegmentedDataContainer(Supplier<PeekableTouchableMap<K,V>> mapSupplier,
int numSegments) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all entries in the container
|
void |
clear(IntSet segments)
Removes all entries that map to the given segments
|
PeekableTouchableMap<K,V> |
getMapForSegment(int segment) |
Iterator<InternalCacheEntry<K,V>> |
iteratorIncludingExpired()
Same as
DataContainer.iterator() except that is also returns expired entries. |
Iterator<InternalCacheEntry<K,V>> |
iteratorIncludingExpired(IntSet segments)
Same as
DataContainer.iteratorIncludingExpired() except that only entries that map to the provided
segments are returned via the iterator. |
void |
removeSegments(IntSet segments)
Removes and un-associates the given segments.
|
Spliterator<InternalCacheEntry<K,V>> |
spliteratorIncludingExpired()
Same as
DataContainer.spliterator() except that is also returns expired entries. |
Spliterator<InternalCacheEntry<K,V>> |
spliteratorIncludingExpired(IntSet segments)
Same as
DataContainer.spliteratorIncludingExpired() except that only entries that map to the provided
segments are returned via this spliterator. |
void |
stop() |
addSegments, forEach, getSegmentForKey, iterator, iterator, publisher, sizeIncludingExpired, sizeIncludingExpired, spliterator, spliterator, startaddRemovalListener, applyListener, compute, compute, computeEntryRemoved, computeEntryWritten, containsKey, containsKey, evict, evict, expiredIterationPredicate, filterExpiredEntries, get, get, handleEviction, peek, peek, put, put, remove, remove, removeRemovalListener, touchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUp, sizecapacity, evictionSize, resize, sizepublic L1SegmentedDataContainer(Supplier<PeekableTouchableMap<K,V>> mapSupplier, int numSegments)
public void stop()
stop in class DefaultSegmentedDataContainer<K,V>public PeekableTouchableMap<K,V> getMapForSegment(int segment)
getMapForSegment in class DefaultSegmentedDataContainer<K,V>public Iterator<InternalCacheEntry<K,V>> iteratorIncludingExpired(IntSet segments)
InternalDataContainerDataContainer.iteratorIncludingExpired() except that only entries that map to the provided
segments are returned via the iterator. The iterator can return expired entries.iteratorIncludingExpired in interface InternalDataContainer<K,V>iteratorIncludingExpired in class DefaultSegmentedDataContainer<K,V>segments - segments of entries to usepublic Iterator<InternalCacheEntry<K,V>> iteratorIncludingExpired()
DataContainerDataContainer.iterator() except that is also returns expired entries.iteratorIncludingExpired in interface DataContainer<K,V>iteratorIncludingExpired in class DefaultSegmentedDataContainer<K,V>public Spliterator<InternalCacheEntry<K,V>> spliteratorIncludingExpired(IntSet segments)
InternalDataContainerDataContainer.spliteratorIncludingExpired() except that only entries that map to the provided
segments are returned via this spliterator. The spliterator will return expired entries as well.spliteratorIncludingExpired in interface InternalDataContainer<K,V>spliteratorIncludingExpired in class DefaultSegmentedDataContainer<K,V>segments - segments of entries to usepublic Spliterator<InternalCacheEntry<K,V>> spliteratorIncludingExpired()
DataContainerDataContainer.spliterator() except that is also returns expired entries.spliteratorIncludingExpired in interface DataContainer<K,V>spliteratorIncludingExpired in class DefaultSegmentedDataContainer<K,V>public void clear()
DataContainerclear in interface DataContainer<K,V>clear in class DefaultSegmentedDataContainer<K,V>public void clear(IntSet segments)
clear in interface InternalDataContainer<K,V>clear in class AbstractInternalDataContainer<K,V>segments - the segments to clear data forpublic void removeSegments(IntSet segments)
InternalDataContainerInternalDataContainer.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).
removeSegments in interface InternalDataContainer<K,V>removeSegments in class DefaultSegmentedDataContainer<K,V>segments - segments that should no longer be associated with this containerCopyright © 2022 JBoss by Red Hat. All rights reserved.