Package org.apache.pekko.dispatch
Class Recover<T>
- java.lang.Object
-
- scala.runtime.AbstractPartialFunction<java.lang.Throwable,T>
-
- org.apache.pekko.dispatch.japi.RecoverBridge<T>
-
- org.apache.pekko.dispatch.Recover<T>
-
- All Implemented Interfaces:
scala.Function1<java.lang.Throwable,T>
,scala.PartialFunction<java.lang.Throwable,T>
public abstract class Recover<T> extends japi.RecoverBridge<T>
Callback for the Future.recover operation that conditionally turns failures into successes.SAM (Single Abstract Method) class
Java API
-
-
Constructor Summary
Constructors Constructor Description Recover()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected T
internal(java.lang.Throwable result)
abstract T
recover(java.lang.Throwable failure)
This method will be invoked once when/if the Future this recover callback is registered on becomes completed with a failure.-
Methods inherited from class org.apache.pekko.dispatch.japi.RecoverBridge
apply, isDefinedAt
-
Methods inherited from class scala.runtime.AbstractPartialFunction
andThen, andThen, apply$mcDD$sp, apply$mcDF$sp, apply$mcDI$sp, apply$mcDJ$sp, apply$mcFD$sp, apply$mcFF$sp, apply$mcFI$sp, apply$mcFJ$sp, apply$mcID$sp, apply$mcIF$sp, apply$mcII$sp, apply$mcIJ$sp, apply$mcJD$sp, apply$mcJF$sp, apply$mcJI$sp, apply$mcJJ$sp, apply$mcVD$sp, apply$mcVF$sp, apply$mcVI$sp, apply$mcVJ$sp, apply$mcZD$sp, apply$mcZF$sp, apply$mcZI$sp, apply$mcZJ$sp, applyOrElse, compose, compose, elementWise, lift, orElse, runWith, toString, unapply
-
-
-
-
Method Detail
-
internal
protected final T internal(java.lang.Throwable result)
- Overrides:
internal
in classjapi.RecoverBridge<T>
-
recover
public abstract T recover(java.lang.Throwable failure) throws java.lang.Throwable
This method will be invoked once when/if the Future this recover callback is registered on becomes completed with a failure.- Returns:
- a successful value for the passed in failure
Throws the passed in failure to propagate it.
Java API
- Throws:
java.lang.Throwable
-
-