K - the key type of accessed ChronicleHashE - the entry typepublic interface HashSegmentContext<K,E extends HashEntry<K>> extends HashContext<K>, MapClosable
ChronicleHash's segment.ChronicleHash.segmentContext(int)| Modifier and Type | Method and Description |
|---|---|
void |
forEachSegmentEntry(Consumer<? super E> action)
Performs the given action for each present entry in this segment until all entries have been processed or the action throws an
Exception. |
boolean |
forEachSegmentEntryWhile(Predicate<? super E> predicate)
Checks the given predicate on each present entry in this segment until all entries have been processed or the predicate returns
false for some entry, or throws an Exception. |
long |
size()
Returns the number of present entries in this segment.
|
hashisClosedcreatedHere, throwExceptionIfClosed, warnAndCloseIfNotClosedvoid forEachSegmentEntry(Consumer<? super E> action)
Exception. Exceptions thrown by the action are relayed to the caller.action - the action to be performed for each entry in this segmentboolean forEachSegmentEntryWhile(Predicate<? super E> predicate)
false for some entry, or throws an Exception. Exceptions thrown by the predicate are relayed to the caller.
If this segment is empty (i. e. size() call returns 0), this method returns
true immediately.
predicate - the predicate to be checked for each entry in this segmenttrue if the predicate returned true for all checked entries, false if it returned false for some entrylong size()
Copyright © 2024. All rights reserved.