/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.spi;

import java.io.Closeable;
import java.util.List;
import java.util.concurrent.CompletableFuture;

public interface ConnectorSplitSource
        extends Closeable
{
    CompletableFuture<List<ConnectorSplit>> getNextBatch(int maxSize);

    @Override
    void close();

    boolean isFinished();
}

@@ -853,24 +853,399 @@
 d close();%0A%0A
+    /**%0A     * Returns whether any more %7B@link ConnectorSplit%7D may be produced.%0A     *%0A     * This method should only be called when there has been no invocation of getNextBatch,%0A     * or result Future of previous getNextBatch is done.%0A     * Calling this method at other time is not useful because the contract of such an invocation%0A     * will be inherently racy.%0A     */%0A
     boolean 

Add javadoc to clarify ConnectorSplitSource.isFinished requirement