Class MultiKt

  • All Implemented Interfaces:

    
    public final class MultiKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> Flow<T> asFlow(Multi<T> $self, Integer bufferCapacity, BufferOverflow bufferOverflowStrategy) Subscribe to this Multi and provide the items as Flow.
      final static <T extends Any> Multi<T> asMulti(Flow<T> $self) Provide this Flows items or failure as Multi.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • asFlow

         final static <T extends Any> Flow<T> asFlow(Multi<T> $self, Integer bufferCapacity, BufferOverflow bufferOverflowStrategy)

        Subscribe to this Multi and provide the items as Flow.

        If this Multi emits a failure, it is thrown from the Flow when operating on it. The subscription to this Multi gets automatically cancelled when the surrounding coroutine fails or gets cancelled.

        The resulting Flow is backed by a Channel which behavior can be configured using:

      • asMulti

         final static <T extends Any> Multi<T> asMulti(Flow<T> $self)

        Provide this Flows items or failure as Multi.

        The MultiEmitter is scheduled as child of callings coroutine context.

        Please note, that the Flows values are emitted immediately, without respecting the requested amount of the subscriber.