Class Futures.MappingCheckedFuture<V,​X extends java.lang.Exception>

    • Field Detail

      • mapper

        final Function<? super java.lang.Exception,​X extends java.lang.Exception> mapper
    • Constructor Detail

    • Method Detail

      • mapException

        protected X mapException​(java.lang.Exception e)
        Description copied from class: AbstractCheckedFuture
        Translates from an InterruptedException, CancellationException or ExecutionException thrown by get to an exception of type X to be thrown by checkedGet. Subclasses must implement this method.

        If e is an InterruptedException, the calling checkedGet method has already restored the interrupt after catching the exception. If an implementation of AbstractCheckedFuture.mapException(Exception) wishes to swallow the interrupt, it can do so by calling Thread.interrupted().

        Subclasses may choose to throw, rather than return, a subclass of RuntimeException to allow creating a CheckedFuture that throws both checked and unchecked exceptions.

        Specified by:
        mapException in class AbstractCheckedFuture<V,​X extends java.lang.Exception>