Class UniMemoizeOp<I>

    • Constructor Detail

      • UniMemoizeOp

        public UniMemoizeOp​(Uni<? extends I> upstream)
      • UniMemoizeOp

        public UniMemoizeOp​(Uni<? extends I> upstream,
                            java.util.function.BooleanSupplier invalidationRequested)
    • Method Detail

      • context

        public Context context()
        Description copied from interface: ContextSupport
        Provide a context.

        Since calls to this method shall only be triggered when a Mutiny pipeline uses a withContext operator, there is no need in general for caching the context value in a field of the implementing class. Exceptions include operators that have cross-subscriber semantics such as memoizers or broadcasters.

        This method is expected to be called once per withContext operator.

        Specified by:
        context in interface ContextSupport
        Returns:
        the context, must not be null.
      • onItem

        public void onItem​(I item)
        Description copied from interface: UniSubscriber
        Event handler called once the item has been computed by the subscribed Uni. IMPORTANT: this method will be only called once per subscription. If UniSubscriber.onFailure(Throwable) is called, this method won't be called.
        Specified by:
        onItem in interface UniSubscriber<I>
        Parameters:
        item - the item, may be null.
      • onFailure

        public void onFailure​(java.lang.Throwable failure)
        Description copied from interface: UniSubscriber
        Called if the computation of the item by the subscriber Uni failed. IMPORTANT: this method will be only called once per subscription. If UniSubscriber.onItem(Object) is called, this method won't be called.
        Specified by:
        onFailure in interface UniSubscriber<I>
        Parameters:
        failure - the failure, cannot be null.