public class BTreeMutable extends BTreeBase implements ITreeMutable
allowsDuplicates, balancePolicy, BOTTOM, BOTTOM_ROOT, dataIterator, DUP_BOTTOM, DUP_INTERNAL, DUP_LEAF, INTERNAL, INTERNAL_ROOT, LEAF, LEAF_DUP_BOTTOM_ROOT, LEAF_DUP_INTERNAL_ROOT, log, size, structureId| Modifier and Type | Method and Description |
|---|---|
boolean |
add(@NotNull jetbrains.exodus.ByteIterable key,
@NotNull jetbrains.exodus.ByteIterable value)
If tree supports duplicates and key already exists, then return false.
|
boolean |
add(@NotNull INode ln)
If tree support duplicates and key already exists, then return false.
|
protected void |
addExpiredLoggable(@NotNull Loggable loggable) |
protected void |
addExpiredLoggable(long address) |
AddressIterator |
addressIterator() |
protected @NotNull jetbrains.exodus.tree.btree.BaseLeafNodeMutable |
createMutableLeaf(@NotNull jetbrains.exodus.ByteIterable key,
@NotNull jetbrains.exodus.ByteIterable value) |
void |
cursorClosed(@NotNull ITreeCursorMutable cursor) |
protected void |
decrementSize(long delta) |
boolean |
delete(@NotNull jetbrains.exodus.ByteIterable key)
Delete key/value pairs for given key.
|
protected boolean |
delete(@NotNull jetbrains.exodus.ByteIterable key,
@Nullable jetbrains.exodus.ByteIterable value) |
boolean |
delete(@NotNull jetbrains.exodus.ByteIterable key,
@Nullable jetbrains.exodus.ByteIterable value,
@Nullable ITreeCursorMutable cursorToSkip)
Delete key/value pair, should be supported only by tree which allows duplicates if value is not null.
|
protected byte |
getBottomPageType() |
@NotNull DataIterator |
getDataIterator(long address) |
@NotNull jetbrains.exodus.tree.ExpiredLoggableCollection |
getExpiredLoggables() |
protected byte |
getInternalPageType() |
protected byte |
getLeafType() |
@NotNull BTreeMutable |
getMutableCopy() |
@Nullable java.lang.Iterable<ITreeCursorMutable> |
getOpenCursors() |
@NotNull jetbrains.exodus.tree.btree.BasePageMutable |
getRoot()
Returns root page of the tree
|
long |
getRootAddress() |
protected void |
incrementSize() |
boolean |
isAllowingDuplicates() |
protected boolean |
isDup() |
TreeCursor |
openCursor() |
boolean |
put(@NotNull jetbrains.exodus.ByteIterable key,
@NotNull jetbrains.exodus.ByteIterable value)
If tree supports duplicates, then add key/value pair.
|
void |
put(@NotNull INode ln)
If tree supports duplicates, then add key/value pair.
|
void |
putRight(@NotNull jetbrains.exodus.ByteIterable key,
@NotNull jetbrains.exodus.ByteIterable value)
Add key/value pair with greatest (rightmost) key.
|
void |
putRight(@NotNull INode ln)
Add key/value pair with greatest (rightmost) key.
|
boolean |
reclaim(@NotNull RandomAccessLoggable loggable,
@NotNull java.util.Iterator<RandomAccessLoggable> loggables)
Same as reclaim with expirationChecker, but takes all loggables into account
|
long |
save()
Save changes to log.
|
dump, dump, get, getBalancePolicy, getLog, getLoggable, getSize, getStructureId, hasKey, hasPair, isDupKey, isEmpty, loadLeaf, loadPage, loadPagepublic long getRootAddress()
getRootAddress in interface ITree@NotNull public @NotNull jetbrains.exodus.tree.btree.BasePageMutable getRoot()
BTreeBasegetRoot in interface ITreeMutablegetRoot in class BTreeBasepublic boolean isAllowingDuplicates()
isAllowingDuplicates in interface ITreeMutable@Nullable public @Nullable java.lang.Iterable<ITreeCursorMutable> getOpenCursors()
getOpenCursors in interface ITreeMutablepublic AddressIterator addressIterator()
addressIterator in interface ITreeaddressIterator in class BTreeBase@NotNull public @NotNull BTreeMutable getMutableCopy()
getMutableCopy in interface ITreegetMutableCopy in class BTreeBase@NotNull public @NotNull DataIterator getDataIterator(long address)
getDataIterator in interface ITreegetDataIterator in class BTreeBasepublic void put(@NotNull
@NotNull INode ln)
ITreeMutableput in interface ITreeMutableln - leaf nodepublic void putRight(@NotNull
@NotNull INode ln)
ITreeMutableputRight in interface ITreeMutableln - leaf node, its key and values should be subtypes of ArrayByteIterablepublic boolean add(@NotNull
@NotNull INode ln)
ITreeMutableadd in interface ITreeMutableln - leaf nodepublic boolean put(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@NotNull
@NotNull jetbrains.exodus.ByteIterable value)
ITreeMutableput in interface ITreeMutablekey - key.value - value.public void putRight(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@NotNull
@NotNull jetbrains.exodus.ByteIterable value)
ITreeMutableputRight in interface ITreeMutablekey - key.value - value.public boolean add(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@NotNull
@NotNull jetbrains.exodus.ByteIterable value)
ITreeMutableadd in interface ITreeMutablekey - key.value - value.public boolean delete(@NotNull
@NotNull jetbrains.exodus.ByteIterable key)
ITreeMutabledelete in interface ITreeMutablekey - key.public boolean delete(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@Nullable
@Nullable jetbrains.exodus.ByteIterable value,
@Nullable
@Nullable ITreeCursorMutable cursorToSkip)
ITreeMutabledelete in interface ITreeMutablekey - key.value - value.cursorToSkip - mutable cursor to skip.protected boolean delete(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@Nullable
@Nullable jetbrains.exodus.ByteIterable value)
protected void decrementSize(long delta)
protected void incrementSize()
public long save()
ITreeMutablesave in interface ITreeMutableprotected void addExpiredLoggable(@NotNull
@NotNull Loggable loggable)
protected void addExpiredLoggable(long address)
@NotNull public @NotNull jetbrains.exodus.tree.ExpiredLoggableCollection getExpiredLoggables()
getExpiredLoggables in interface ITreeMutablepublic TreeCursor openCursor()
openCursor in interface ITreeopenCursor in class BTreeBasepublic void cursorClosed(@NotNull
@NotNull ITreeCursorMutable cursor)
cursorClosed in interface ITreeMutableprotected byte getBottomPageType()
protected byte getInternalPageType()
protected byte getLeafType()
protected boolean isDup()
@NotNull
protected @NotNull jetbrains.exodus.tree.btree.BaseLeafNodeMutable createMutableLeaf(@NotNull
@NotNull jetbrains.exodus.ByteIterable key,
@NotNull
@NotNull jetbrains.exodus.ByteIterable value)
public boolean reclaim(@NotNull
@NotNull RandomAccessLoggable loggable,
@NotNull
@NotNull java.util.Iterator<RandomAccessLoggable> loggables)
ITreeMutablereclaim in interface ITreeMutableloggable - a candidate to reclaim.loggables - loggables following the candidate.