Class DisposeOnCancel

  • All Implemented Interfaces:
    java.util.concurrent.Future<java.lang.Object>

    final class DisposeOnCancel
    extends java.lang.Object
    implements java.util.concurrent.Future<java.lang.Object>
    Implements the Future interface and calls dispose() on cancel() but the other methods are not implemented.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Disposable upstream  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)  
      java.lang.Object get()  
      java.lang.Object get​(long timeout, @NonNull java.util.concurrent.TimeUnit unit)  
      boolean isCancelled()  
      boolean isDone()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DisposeOnCancel

        DisposeOnCancel​(Disposable d)
    • Method Detail

      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<java.lang.Object>
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<java.lang.Object>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<java.lang.Object>
      • get

        public java.lang.Object get()
        Specified by:
        get in interface java.util.concurrent.Future<java.lang.Object>
      • get

        public java.lang.Object get​(long timeout,
                                    @NonNull
                                    @NonNull java.util.concurrent.TimeUnit unit)
        Specified by:
        get in interface java.util.concurrent.Future<java.lang.Object>