Interface RTransferQueueRx<V>

    • Method Detail

      • transfer

        io.reactivex.rxjava3.core.Completable transfer​(V e)
        Transfers the element to waiting consumer which invoked RBlockingQueueRx.take() or RBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit) method at the moment of transfer. Waits if necessary for a consumer.
        Parameters:
        e - the element to transfer
        Throws:
        - if the class of the specified element prevents it from being added to this queue
        - if the specified element is null
        - if some property of the specified element prevents it from being added to this queue
      • tryTransfer

        io.reactivex.rxjava3.core.Single<> tryTransfer​(V e,
                                                              long timeout,
                                                               unit)
        Transfers the element to waiting consumer which invoked RBlockingQueueRx.take() or RBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit) method at the moment of transfer. Waits up to defined timeout if necessary for a consumer.
        Parameters:
        e - the element to transfer
        timeout - the maximum time to wait
        unit - the time unit
        Returns:
        true if the element was transferred and false otherwise