Add javadoc to clarify ConnectorSplitSource.isFinished requirement
@@ -25,5 +25,13 @@ public interface ConnectorSplitSource
@Override
void close();
+ /**
+ * Returns whether any more {@link ConnectorSplit} may be produced.
+ *
+ * This method should only be called when there has been no invocation of getNextBatch,
+ * or result Future of previous getNextBatch is done.
+ * Calling this method at other time is not useful because the contract of such an invocation
+ * will be inherently racy.
+ */
boolean isFinished();
}
