mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
[Java] Rename org.rocksdb.Iterator to org.rocksdb.RocksIterator.
Summary: Renamed Iterator to RocksIterator to avoid potential confliction with the Java built-in Iterator. Test Plan: make rocksdbjava make jtest Reviewers: haobo, dhruba, sdong, ankgup87 Reviewed By: sdong CC: leveldb, rsumbaly, swapnilghike, zzbennett Differential Revision: https://reviews.facebook.net/D18615
This commit is contained in:
@@ -311,8 +311,8 @@ public class RocksDB extends RocksObject {
|
||||
*
|
||||
* @return instance of iterator object.
|
||||
*/
|
||||
public Iterator newIterator() {
|
||||
return new Iterator(iterator0(nativeHandle_));
|
||||
public RocksIterator newIterator() {
|
||||
return new RocksIterator(iterator0(nativeHandle_));
|
||||
}
|
||||
|
||||
@Override protected void finalize() {
|
||||
|
||||
@@ -11,13 +11,13 @@ package org.rocksdb;
|
||||
* are provided by this library. In particular, iterators are provided
|
||||
* to access the contents of a Table or a DB.
|
||||
*
|
||||
* Multiple threads can invoke const methods on an Iterator without
|
||||
* Multiple threads can invoke const methods on an RocksIterator without
|
||||
* external synchronization, but if any of the threads may call a
|
||||
* non-const method, all threads accessing the same Iterator must use
|
||||
* non-const method, all threads accessing the same RocksIterator must use
|
||||
* external synchronization.
|
||||
*/
|
||||
public class Iterator extends RocksObject {
|
||||
public Iterator(long nativeHandle) {
|
||||
public class RocksIterator extends RocksObject {
|
||||
public RocksIterator(long nativeHandle) {
|
||||
super();
|
||||
nativeHandle_ = nativeHandle;
|
||||
}
|
||||
@@ -416,7 +416,7 @@ public class DbBenchmark {
|
||||
super(tid, randSeed, numEntries, keyRange);
|
||||
}
|
||||
@Override public void runTask() throws RocksDBException {
|
||||
org.rocksdb.Iterator iter = db_.newIterator();
|
||||
RocksIterator iter = db_.newIterator();
|
||||
long i;
|
||||
for (iter.seekToFirst(), i = 0;
|
||||
iter.isValid() && i < numEntries_;
|
||||
|
||||
Reference in New Issue
Block a user