Created
May 12, 2022 19:00
-
-
Save arjunsk/315a6239a9a3016746dde8e645b2f64e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a heap-allocated iterator over the contents of the | |
* database. | |
* <p> | |
* Caller should close the iterator when it is no longer needed. | |
* The returned iterator should be closed before this db is closed. | |
* <p> | |
* <pre> | |
* KVIterator it = unsafeLocalIterator(); | |
* try { | |
* // do something | |
* } finally { | |
* it.close(); | |
* } | |
* <pre/> | |
*/ | |
public KVIterator unsafeLocalIterator() { | |
checkState(); | |
if (this.pdClient instanceof RemotePlacementDriverClient) { | |
throw new UnsupportedOperationException("unsupported operation on multi-region"); | |
} | |
if (this.storeEngine == null) { | |
throw new IllegalStateException("current node do not have store engine"); | |
} | |
return this.storeEngine.getRawKVStore().localIterator(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment