use of jetbrains.exodus.ByteIterable in project xodus by JetBrains.
the class BTreeMutable method put.
@Override
public void put(@NotNull INode ln) {
final ByteIterable value = ln.getValue();
if (value == null) {
throw new ExodusException("Value can't be null");
}
put(ln.getKey(), value);
}
use of jetbrains.exodus.ByteIterable in project xodus by JetBrains.
the class BTreeMutable method putRight.
@Override
public void putRight(@NotNull INode ln) {
final ByteIterable value = ln.getValue();
if (value == null) {
throw new ExodusException("Value can't be null");
}
putRight(ln.getKey(), value);
}
use of jetbrains.exodus.ByteIterable in project xodus by JetBrains.
the class BasePage method isInPageRange.
boolean isInPageRange(@NotNull final ByteIterable key, @Nullable final ByteIterable value) {
final ILeafNode maxKey = getMaxKey();
int cmp = maxKey.getKey().compareTo(key);
if (cmp < 0) {
return false;
}
if (cmp == 0 && value != null) {
@Nullable final ByteIterable maxValue = maxKey.getValue();
if (maxValue == null || maxValue.compareTo(value) < 0) {
return false;
}
}
if (size == 1) {
return true;
}
final ILeafNode minKey = getMinKey();
cmp = minKey.getKey().compareTo(key);
if (cmp > 0) {
return false;
}
if (cmp == 0 && value != null) {
@Nullable final ByteIterable minValue = minKey.getValue();
return minValue != null && minValue.compareTo(value) <= 0;
}
return true;
}
Aggregations