mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add more iterator JNI bindings
This commit is contained in:
@@ -37,6 +37,26 @@ public class Iterator {
|
||||
prev0(nativeHandle_);
|
||||
}
|
||||
|
||||
public byte[] key() {
|
||||
assert(isInitialized());
|
||||
return key0(nativeHandle_);
|
||||
}
|
||||
|
||||
public byte[] value() {
|
||||
assert(isInitialized());
|
||||
return value0(nativeHandle_);
|
||||
}
|
||||
|
||||
public void seek(byte[] target) {
|
||||
assert(isInitialized());
|
||||
seek0(nativeHandle_, target, target.length);
|
||||
}
|
||||
|
||||
public void status(){
|
||||
assert(isInitialized());
|
||||
status0(nativeHandle_);
|
||||
}
|
||||
|
||||
public synchronized void close() {
|
||||
if(nativeHandle_ != 0) {
|
||||
close0(nativeHandle_);
|
||||
@@ -57,4 +77,8 @@ public class Iterator {
|
||||
private native void seekToLast0(long handle);
|
||||
private native void next0(long handle);
|
||||
private native void prev0(long handle);
|
||||
private native byte[] key0(long handle);
|
||||
private native byte[] value0(long handle);
|
||||
private native void seek0(long handle, byte[] target, int targetLen);
|
||||
private native void status0(long handle);
|
||||
}
|
||||
Reference in New Issue
Block a user