V - The result type returned by this Future's get method.public class LoggingScheduledFuture<V> extends LoggingFuture<V> implements java.util.concurrent.RunnableScheduledFuture<V>
logger, resultRelevant| Constructor and Description |
|---|
LoggingScheduledFuture(java.util.concurrent.RunnableScheduledFuture<V> future,
boolean resultRelevant,
java.util.logging.Logger logger)
Creates a new future wrapping the designated
RunnableScheduledFuture logging the outcome of the future if
no one has retrieved it. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(java.util.concurrent.Delayed o) |
long |
getDelay(java.util.concurrent.TimeUnit unit) |
protected java.util.concurrent.RunnableScheduledFuture<V> |
getWrappedFutureRunnable()
Gets the wrapped future runnable.
|
boolean |
isPeriodic() |
equals, finalize, get, get, hashCode, isCancelled, isDone, runpublic LoggingScheduledFuture(java.util.concurrent.RunnableScheduledFuture<V> future, boolean resultRelevant, java.util.logging.Logger logger)
RunnableScheduledFuture logging the outcome of the future if
no one has retrieved it.future - The RunnableScheduledFuture which to wrap.resultRelevant - Whether the result of the future is relevant and
therefore it should be logged if it is not retrieved.logger - The logger for logging unhandled results, Exception,
RuntimeException or Error.protected java.util.concurrent.RunnableScheduledFuture<V> getWrappedFutureRunnable()
LoggingFuturegetWrappedFutureRunnable in class LoggingFuture<V>public long getDelay(java.util.concurrent.TimeUnit unit)
getDelay in interface java.util.concurrent.Delayedpublic boolean isPeriodic()
isPeriodic in interface java.util.concurrent.RunnableScheduledFuture<V>public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<V>cancel in class LoggingFuture<V>public int compareTo(java.util.concurrent.Delayed o)
compareTo in interface java.lang.Comparable<java.util.concurrent.Delayed>