Code example for Future

Methods: isCancelled

0
        return future.cancel(mayInterruptIfRunning);
    } 
 
    public boolean isCancelled() 
    { 
        return future.isCancelled();
    } 
 
    public boolean isDone() 
    { 
        return future.isDone();
    } 
 
    public To get() throws InterruptedException, ExecutionException 
    { 
        From x = future.get();
        return map.eval(x);
    } 
 
    public To get(long timeout, TimeUnit unit) throws InterruptedException,
            ExecutionException, TimeoutException