Uses of Class
io.permazen.kv.KeyRange
Package
Description
Core classes for the Permazen Java persistence layer.
Permazen
Encoding
s.byte[]
array key/value store API and related utility classes.Utility classes for MVCC type operations using a
KVStore
.Utility classes relating to the
KVDatabase
interface.-
Uses of KeyRange in io.permazen.core
Modifier and TypeMethodDescriptionstatic KeyRange
ObjId.getKeyRange
(int storageId) Get theKeyRange
containing all object IDs with the given storage ID. -
Uses of KeyRange in io.permazen.encoding
Modifier and TypeMethodDescriptiondefault KeyRange
Encoding.getKeyRange
(Bounds<? extends T> bounds) Calculate theKeyRange
that includes exactly those encoded values that lie within the given bounds. -
Uses of KeyRange in io.permazen.kv
Modifier and TypeFieldDescriptionstatic final KeyRange
KeyRange.FULL
TheKeyRange
containing the full range (i.e., all keys).Modifier and TypeFieldDescriptionstatic final Comparator<KeyRange>
KeyRange.SORT_BY_MAX
static final Comparator<KeyRange>
KeyRange.SORT_BY_MIN
Modifier and TypeMethodDescriptionstatic KeyRange
KeyRange.empty
(byte[] key) Create an empty key range at the specified key.KeyRange[]
KeyRanges.findKey
(byte[] key) Find the contiguousKeyRange
(s) within this instance containing, or adjacent to, the given key.static KeyRange
KeyRange.forPrefix
(byte[] prefix) Construct an instance containing all keys with the given prefix.KVPairIterator.getKeyRange()
Get theKeyRange
instance used to restrict the range of visible keys, if any.KeyRange.prefixedBy
(byte[] prefix) Create a new instance whose minimum and maximum keys are the same as this instance's but with the given byte sequence prepended.Modifier and TypeMethodDescriptionKeyRanges.asList()
Get theKeyRange
s underlying with this instance as a list.KeyRanges.asSet()
Get a view of theKeyRange
s underlying with this instance as a sorted set.KeyRanges.deserializeIterator
(InputStream input) Deserialize an instance created byserialize()
in the form of an iterator of the individualKeyRange
s.KeyRanges.iterator()
Modifier and TypeMethodDescriptionvoid
Add all the keys in the givenKeyRange
to this instance.boolean
Determine if this key range fully contains the specified key range.boolean
default CloseableIterator<KVPair>
Iterate the key/value pairs in the specified range in the forward direction.void
Remove all the keys not also in the givenKeyRange
from this instance.boolean
KeyRanges.intersects
(KeyRange range) Determine whether this instance intersects the givenKeyRange
, i.e., there exists at least one key contained in both.boolean
Determine if this key range overlaps the specified key range, i.e., there exists at least onebyte[]
key that both ranges have in common.void
Remove all the keys in the givenKeyRange
from this instance.default void
KVStore.removeRange
(KeyRange range) Remove all key/value pairs whose keys are in a given range.ModifierConstructorDescriptionConstructor for an instance containing a single range.Constructor.KVPairIterator
(KVStore kv, KeyRange keyRange) Convenience constructor for forward iteration over a specified range.KVPairIterator
(KVStore kv, KeyRange keyRange, KeyFilter keyFilter, boolean reverse) Primary constructor. -
Uses of KeyRange in io.permazen.kv.mvcc
Modifier and TypeMethodDescriptionReadRemoveConflict.getKeyRange()
Get the key range at which the conflict occurred.Modifier and TypeMethodDescriptionMutations.getRemoveRanges()
Get the key ranges removals contained by this instance.Writes.getRemoveRanges()
-
Uses of KeyRange in io.permazen.kv.util
Modifier and TypeFieldDescriptionprotected final KeyRange
AbstractKVNavigableMap.keyRange
Key range, or null for the entire range.protected final KeyRange
AbstractKVNavigableSet.keyRange
Key range, or null for the entire range.Modifier and TypeMethodDescriptionprotected abstract NavigableMap<K,
V> AbstractKVNavigableMap.createSubMap
(boolean newReversed, KeyRange newKeyRange, KeyFilter newKeyFilter, Bounds<K> newBounds) Create a (possibly reversed) view of this instance with (possibly) tighter lower and/or upper bounds and the givenKeyFilter
, if any.protected NavigableMap<byte[],
byte[]> KVNavigableMap.createSubMap
(boolean newReversed, KeyRange newKeyRange, KeyFilter newKeyFilter, Bounds<byte[]> newBounds) protected abstract NavigableSet<E>
AbstractKVNavigableSet.createSubSet
(boolean newReversed, KeyRange newKeyRange, KeyFilter newKeyFilter, Bounds<E> newBounds) Create a (possibly reversed) view of this instance with (possibly) tighter lower and/or upper bounds and the givenKeyFilter
, if any.protected NavigableSet<byte[]>
KVNavigableSet.createSubSet
(boolean newReversed, KeyRange newKeyRange, KeyFilter newKeyFilter, Bounds<byte[]> newBounds) boolean
Trigger all watches associated with keys in the given range.ModifierConstructorDescriptionprotected
AbstractKVIterator
(KVStore kv, boolean prefixMode, boolean reversed, KeyRange keyRange, KeyFilter keyFilter) Primary constructor.protected
AbstractKVNavigableMap
(KVStore kv, boolean prefixMode, boolean reversed, KeyRange keyRange, KeyFilter keyFilter, Bounds<K> bounds) Internal constructor.protected
AbstractKVNavigableMap
(KVStore kv, boolean prefixMode, KeyRange keyRange) Primary constructor.protected
AbstractKVNavigableSet
(KVStore kv, boolean prefixMode, boolean reversed, KeyRange keyRange, KeyFilter keyFilter, Bounds<E> bounds) Internal constructor.protected
AbstractKVNavigableSet
(KVStore kv, boolean prefixMode, KeyRange keyRange) Primary constructor.protected
KVNavigableMap
(KVStore kv, boolean reversed, KeyRange keyRange, KeyFilter keyFilter) Primary constructor.protected
KVNavigableSet
(KVStore kv, boolean reversed, KeyRange keyRange, KeyFilter keyFilter) Primary constructor.