Interface HandlerContext.UnresolvedFuture
- All Known Subinterfaces:
HandlerContext.UnresolvedFuture.AllOf, HandlerContext.UnresolvedFuture.AnyOf, HandlerContext.UnresolvedFuture.Combinator, HandlerContext.UnresolvedFuture.Mapped, HandlerContext.UnresolvedFuture.Single
- Enclosing interface:
HandlerContext
public static sealed interface HandlerContext.UnresolvedFuture
permits HandlerContext.UnresolvedFuture.Single, HandlerContext.UnresolvedFuture.Mapped, HandlerContext.UnresolvedFuture.Combinator
Node of a future tree, awaited with
HandlerContext.await(UnresolvedFuture). A node is either a HandlerContext.UnresolvedFuture.Single node, a HandlerContext.UnresolvedFuture.Mapped node, or a HandlerContext.UnresolvedFuture.Combinator node (HandlerContext.UnresolvedFuture.AnyOf or HandlerContext.UnresolvedFuture.AllOf).
The HandlerContext implementation reads the tree from another thread while HandlerContext.await(UnresolvedFuture) is in progress: the tree structure must not change, and isDone() must be safe to read from other threads.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCompletes when all children succeed, or fails as soon as one child fails.static interfaceCompletes as soon as any child completes, either with success or failure.static interfaceNode combining several children.static interfaceNode mapping the result of theupstreamnode.static interfaceNode completed by the result of itsHandlerContext.Handle, with no children. -
Method Summary
-
Method Details
-
isDone
boolean isDone()- Returns:
- true if this node is completed. Completed nodes, and their children, are not awaited anymore.
-