Class PromiseNotificationUtil


  • public final class PromiseNotificationUtil
    extends java.lang.Object
    Internal utilities to notify Promises.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void tryCancel​(Promise<?> p, InternalLogger logger)
      Try to cancel the Promise and log if logger is not null in case this fails.
      static void tryFailure​(Promise<?> p, java.lang.Throwable cause, InternalLogger logger)
      Try to mark the Promise as failure and log if logger is not null in case this fails.
      static <V> void trySuccess​(Promise<? super V> p, V result, InternalLogger logger)
      Try to mark the Promise as success and log if logger is not null in case this fails.
      • Methods inherited from class java.lang.Object

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

      • tryCancel

        public static void tryCancel​(Promise<?> p,
                                     InternalLogger logger)
        Try to cancel the Promise and log if logger is not null in case this fails.
      • trySuccess

        public static <V> void trySuccess​(Promise<? super V> p,
                                          V result,
                                          InternalLogger logger)
        Try to mark the Promise as success and log if logger is not null in case this fails.
      • tryFailure

        public static void tryFailure​(Promise<?> p,
                                      java.lang.Throwable cause,
                                      InternalLogger logger)
        Try to mark the Promise as failure and log if logger is not null in case this fails.