Class JimfsAsynchronousFileChannel.CompletionHandlerCallback<R,​A>

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    JimfsAsynchronousFileChannel

    private static final class JimfsAsynchronousFileChannel.CompletionHandlerCallback<R,​A>
    extends java.lang.Object
    implements java.lang.Runnable
    Runnable callback that wraps a CompletionHandler and an attachment.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private @Nullable A attachment  
      private java.nio.channels.CompletionHandler<R,​? super A> completionHandler  
      private com.google.common.util.concurrent.ListenableFuture<R> future  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CompletionHandlerCallback​(com.google.common.util.concurrent.ListenableFuture<R> future, java.nio.channels.CompletionHandler<R,​? super A> completionHandler, @Nullable A attachment)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void onFailure​(java.lang.Throwable t)  
      private void onSuccess​(R result)  
      void run()  
      • Methods inherited from class java.lang.Object

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

      • future

        private final com.google.common.util.concurrent.ListenableFuture<R> future
      • completionHandler

        private final java.nio.channels.CompletionHandler<R,​? super A> completionHandler
      • attachment

        private final @Nullable A attachment
    • Constructor Detail

      • CompletionHandlerCallback

        private CompletionHandlerCallback​(com.google.common.util.concurrent.ListenableFuture<R> future,
                                          java.nio.channels.CompletionHandler<R,​? super A> completionHandler,
                                          @Nullable A attachment)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • onSuccess

        private void onSuccess​(R result)
      • onFailure

        private void onFailure​(java.lang.Throwable t)