Class LoggingScheduledFuture<V>

java.lang.Object
de.aristaflow.adept2.util.threading.LoggingFuture<V>
de.aristaflow.adept2.util.threading.LoggingScheduledFuture<V>
Type Parameters:
V - The result type returned by this Future's get method.
All Implemented Interfaces:
Comparable<Delayed>, Runnable, Delayed, Future<V>, RunnableFuture<V>, RunnableScheduledFuture<V>, ScheduledFuture<V>

public class LoggingScheduledFuture<V> extends LoggingFuture<V> implements RunnableScheduledFuture<V>
A scheduled future that wraps another future and logs all occurred exceptions and the result for information purpose if no one was interested in it.
Author:
Ulrich Kreher
  • Constructor Details

    • LoggingScheduledFuture

      public LoggingScheduledFuture(RunnableScheduledFuture<V> future, boolean resultRelevant, Logger logger)
      Creates a new future wrapping the designated RunnableScheduledFuture logging the outcome of the future if no one has retrieved it.
      Parameters:
      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.
  • Method Details