public interface ISimpleBTree
Interface for non-batch operations on a B+-Tree mapping non-null variable length unsigned byte[] keys to arbitrary values.
UnicodeKeyBuilder, which may be used to encode one or more primitive
data type values or Unicode strings into a variable length unsigned
byte[] key.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(byte[] key)
Return
true iff there is a (non-deleted) index entry for
the key. |
byte[] |
insert(byte[] key,
byte[] value)
Insert or update a value under the key.
|
byte[] |
lookup(byte[] key)
Lookup a value for a key.
|
byte[] |
putIfAbsent(byte[] key,
byte[] value)
Insert or update a value under the key iff there is no entry for that key
in the index.
|
byte[] |
remove(byte[] key)
Remove the key and its associated value.
|
byte[] insert(byte[] key,
byte[] value)
key - The key.value - The value (may be null).null if the
key was not found or if the previous entry for that key was
marked as deleted.byte[] putIfAbsent(byte[] key,
byte[] value)
if (!contains(key))
insert(key, value);
However, if the index allows null values to be stored under
a key and the application in fact stores null values for
some tuples, then caller is not able to decide using this method whether
or not the mutation was applied based on the return value. For these
cases if the caller needs to know whether or not the conditional mutation
actually took place, the caller CAN use the pattern
if(!contains()) insert(key,value); to obtain that
information.key - The key.value - The value (may be null).null if the key
was not found or if the previous entry for that key was marked as
deleted. Note that the return value MAY be null even
if there was an entry under the key. This is because the index is
capable of storing a null value. In such cases the
conditional mutation WAS NOT applied.(putIfAbsent)byte[] lookup(byte[] key)
null if there
is no entry for that key or if the entry under that key is marked
as deleted.boolean contains(byte[] key)
true iff there is a (non-deleted) index entry for
the key. An index entry with a null value will cause this
method to return true. A deleted index entry will cause
this method to return false.key - The key.true if the index contains an (un-deleted) entry
for that key.byte[] remove(byte[] key)
key - The key.null if the key
was not found or if the previous entry under that key was marked
as deleted.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.