Example usage for java.util.concurrent RunnableFuture isDone

List of usage examples for java.util.concurrent RunnableFuture isDone

Introduction

In this page you can find the example usage for java.util.concurrent RunnableFuture isDone.

Prototype

boolean isDone();

Source Link

Document

Returns true if this task completed.

Usage

From source file:org.apache.flink.runtime.state.StateBackendTestBase.java

private KeyGroupsStateHandle runSnapshot(RunnableFuture<KeyGroupsStateHandle> snapshotRunnableFuture)
        throws Exception {
    if (!snapshotRunnableFuture.isDone()) {
        Thread runner = new Thread(snapshotRunnableFuture);
        runner.start();//from   w ww  . ja  v a2s .  c om
    }
    return snapshotRunnableFuture.get();
}