mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Add doc + refactor + fix formatting
This commit is contained in:
@@ -141,9 +141,9 @@ public class RocksDBSample {
|
||||
System.out.println("Failed in call to geHistogramData()");
|
||||
assert(false); //Should never reach here.
|
||||
}
|
||||
|
||||
|
||||
Iterator iterator = db.iterator();
|
||||
|
||||
|
||||
boolean seekToFirstPassed = false;
|
||||
for (iterator.seekToFirst(); iterator.isValid(); iterator.next()) {
|
||||
iterator.status();
|
||||
@@ -154,7 +154,7 @@ public class RocksDBSample {
|
||||
if(seekToFirstPassed) {
|
||||
System.out.println("iterator seekToFirst tests passed.");
|
||||
}
|
||||
|
||||
|
||||
boolean seekToLastPassed = false;
|
||||
for (iterator.seekToLast(); iterator.isValid(); iterator.prev()) {
|
||||
iterator.status();
|
||||
@@ -162,18 +162,18 @@ public class RocksDBSample {
|
||||
assert(iterator.value() != null);
|
||||
seekToLastPassed = true;
|
||||
}
|
||||
|
||||
|
||||
if(seekToLastPassed) {
|
||||
System.out.println("iterator seekToLastPassed tests passed.");
|
||||
}
|
||||
|
||||
|
||||
iterator.seekToFirst();
|
||||
iterator.seek(iterator.key());
|
||||
assert(iterator.key() != null);
|
||||
assert(iterator.value() != null);
|
||||
|
||||
|
||||
System.out.println("iterator seek test passed.");
|
||||
|
||||
|
||||
iterator.close();
|
||||
System.out.println("iterator tests passed.");
|
||||
} catch (RocksDBException e) {
|
||||
|
||||
Reference in New Issue
Block a user