Interface WriteStream<T>

    • Method Detail

      • getDelegate

        io.vertx.core.streams.WriteStream getDelegate()
        Specified by:
        getDelegate in interface StreamBase
      • write

        io.smallrye.mutiny.Uni<Void> write​(T data)
        Same as but with an handler called when the operation completes

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        data -
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • writeAndAwait

        Void writeAndAwait​(T data)
        Blocking variant of io.vertx.mutiny.core.streams.WriteStream#write(T).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        data -
        Returns:
        the Void instance produced by the operation
      • end

        io.smallrye.mutiny.Uni<Void> end()
        Same as end() but with an handler called when the operation completes

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • endAndAwait

        Void endAndAwait()
        Blocking variant of end().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the Void instance produced by the operation
      • end

        io.smallrye.mutiny.Uni<Void> end​(T data)
        Same as but with an handler called when the operation completes

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        data -
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • endAndAwait

        Void endAndAwait​(T data)
        Blocking variant of io.vertx.mutiny.core.streams.WriteStream#end(T).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        data -
        Returns:
        the Void instance produced by the operation
      • setWriteQueueMaxSize

        WriteStream<T> setWriteQueueMaxSize​(int maxSize)
        Parameters:
        maxSize - the max size of the write stream
        Returns:
        a reference to this, so the API can be used fluently
      • writeQueueFull

        boolean writeQueueFull()
        Returns:
        true if write queue is full
      • drainHandler

        WriteStream<T> drainHandler​(Consumer<Void> handler)
        Parameters:
        handler - the handler
        Returns:
        a reference to this, so the API can be used fluently
      • newInstance

        static <T> WriteStream<T> newInstance​(io.vertx.core.streams.WriteStream arg)
      • newInstance

        static <T> WriteStream<T> newInstance​(io.vertx.core.streams.WriteStream arg,
                                              TypeArg<T> __typeArg_T)