-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address review comment - round 3 (this commit will be squashed later)
- Adding to CHANGES file - s/zkid/czxid - Better javadoc and more comments - Minor refactoring and renaming - Add test for empty children list and iteration beyond last element
- Loading branch information
Marco Primi
committed
Apr 11, 2017
1 parent
b010a79
commit b76fb4e
Showing
9 changed files
with
198 additions
and
86 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
package org.apache.zookeeper; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
/** | ||
* Iterator that involves server communication, and as such can throw | ||
* An iterator over a collection whose elements need to be fetched remotely. | ||
*/ | ||
public interface RemoteIterator<E> { | ||
|
||
/** | ||
* Returns true if the iterator has more elements. | ||
* @return true if the iterator has more elements, false otherwise. | ||
*/ | ||
boolean hasNext(); | ||
|
||
E next() throws InterruptedException, KeeperException; | ||
/** | ||
* Returns the next element in the iteration. | ||
* @return the next element in the iteration. | ||
* @throws InterruptedException if the thread is interrupted | ||
* @throws KeeperException if an error is encountered server-side | ||
* @throws NoSuchElementException if the iteration has no more elements | ||
*/ | ||
E next() throws InterruptedException, KeeperException, NoSuchElementException; | ||
} |
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
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
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
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
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
Oops, something went wrong.