Cpaulyz commented on code in PR #10231:
URL: https://github.com/apache/iotdb/pull/10231#discussion_r1236570003


##########
server/src/main/java/org/apache/iotdb/db/metadata/query/reader/ISchemaReader.java:
##########
@@ -21,9 +21,17 @@
 
 import org.apache.iotdb.db.metadata.query.info.ISchemaInfo;
 
-import java.util.Iterator;
+import com.google.common.util.concurrent.ListenableFuture;
+
+import static com.google.common.util.concurrent.Futures.immediateFuture;
+import static com.google.common.util.concurrent.Futures.immediateVoidFuture;
+
+public interface ISchemaReader<T extends ISchemaInfo> extends AutoCloseable {
+
+  ListenableFuture<Boolean> NOT_BLOCKED_TRUE = immediateFuture(true);
+  ListenableFuture<Boolean> NOT_BLOCKED_FALSE = immediateFuture(false);
+  ListenableFuture<Void> NOT_BLOCKED = immediateVoidFuture();
 
-public interface ISchemaReader<T extends ISchemaInfo> extends Iterator<T>, 
AutoCloseable {

Review Comment:
   We only use the interfaces hasNext and next, with the addition of isBlocked 
and no support for operations such as reset, so I think we can leave the 
Iterator unimplemented.
   
   Also, this makes it easier to do static call analysis in IDEA.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to