Class DelegatingScheduler.ScheduledCompletableFuture<V>

  • All Implemented Interfaces:
    java.lang.Comparable<java.util.concurrent.Delayed>, java.util.concurrent.CompletionStage<V>, java.util.concurrent.Delayed, java.util.concurrent.Future<V>, java.util.concurrent.ScheduledFuture<V>
    Enclosing class:
    DelegatingScheduler

    static final class DelegatingScheduler.ScheduledCompletableFuture<V>
    extends java.util.concurrent.CompletableFuture<V>
    implements java.util.concurrent.ScheduledFuture<V>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

        java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.Future<V> delegate  
      (package private) java.lang.Thread forkJoinPoolThread  
      private long time  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScheduledCompletableFuture​(long delay, java.util.concurrent.TimeUnit unit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)  
      int compareTo​(java.util.concurrent.Delayed other)  
      long getDelay​(java.util.concurrent.TimeUnit unit)  
      • Methods inherited from class java.util.concurrent.CompletableFuture

        acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.Future

        get, get, isCancelled, isDone
    • Field Detail

      • delegate

        volatile java.util.concurrent.Future<V> delegate
      • forkJoinPoolThread

        java.lang.Thread forkJoinPoolThread
      • time

        private final long time
    • Constructor Detail

      • ScheduledCompletableFuture

        ScheduledCompletableFuture​(long delay,
                                   java.util.concurrent.TimeUnit unit)
    • Method Detail

      • getDelay

        public long getDelay​(java.util.concurrent.TimeUnit unit)
        Specified by:
        getDelay in interface java.util.concurrent.Delayed
      • compareTo

        public int compareTo​(java.util.concurrent.Delayed other)
        Specified by:
        compareTo in interface java.lang.Comparable<V>
      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<V>
        Overrides:
        cancel in class java.util.concurrent.CompletableFuture<V>