Package org.openhab.core.util
Class SameThreadExecutorService.ImpostorScheduledFuture<T>
java.lang.Object
org.openhab.core.util.SameThreadExecutorService.ImpostorScheduledFuture<T>
- Type Parameters:
- T- the return type.
- All Implemented Interfaces:
- Comparable<Delayed>,- Delayed,- Future<T>,- ScheduledFuture<T>
- Enclosing class:
- SameThreadExecutorService
protected static class SameThreadExecutorService.ImpostorScheduledFuture<T>
extends Object
implements ScheduledFuture<T>
A 
ScheduledFuture that wraps a Future and always reports zero delay.- Author:
- Ravi Nadahar - Initial contribution
- 
Nested Class SummaryNested classes/interfaces inherited from interface java.util.concurrent.FutureFuture.State
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionImpostorScheduledFuture(Future<T> future) Creates a new instance that wraps the specifiedFuture.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.FutureexceptionNow, resultNow, state
- 
Field Details- 
delegateThe wrappedFuture
 
- 
- 
Constructor Details
- 
Method Details- 
getDelay
- 
compareTo- Specified by:
- compareToin interface- Comparable<T>
 
- 
cancelpublic boolean cancel(boolean mayInterruptIfRunning) 
- 
isCancelledpublic boolean isCancelled()- Specified by:
- isCancelledin interface- Future<T>
 
- 
isDonepublic boolean isDone()
- 
get- Specified by:
- getin interface- Future<T>
- Throws:
- InterruptedException
- ExecutionException
 
- 
getpublic T get(long timeout, @Nullable TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
- getin interface- Future<T>
- Throws:
- InterruptedException
- ExecutionException
- TimeoutException
 
 
-