protected class FairBlockingQueue.ItemFuture<T> extends Object implements Future<T>
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | canceled | 
| protected T | item | 
| protected FairBlockingQueue.ExchangeCountDownLatch<T> | latch | 
| Constructor and Description | 
|---|
| FairBlockingQueue.ItemFuture(FairBlockingQueue.ExchangeCountDownLatch<T> latch) | 
| FairBlockingQueue.ItemFuture(T item) | 
protected volatile T item
protected volatile FairBlockingQueue.ExchangeCountDownLatch<T> latch
protected volatile boolean canceled
public FairBlockingQueue.ItemFuture(T item)
public FairBlockingQueue.ItemFuture(FairBlockingQueue.ExchangeCountDownLatch<T> latch)
public boolean cancel(boolean mayInterruptIfRunning)
public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<T>Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.