Package reactor.core

Interface Fuseable.SynchronousSubscription<T>

Type Parameters:
T - the content value type
All Superinterfaces:
Collection<T>, Fuseable.QueueSubscription<T>, Iterable<T>, Queue<T>, Subscription
Enclosing interface:
Fuseable

public static interface Fuseable.SynchronousSubscription<T> extends Fuseable.QueueSubscription<T>
Base class for synchronous sources which have fixed size and can emit their items in a pull fashion, thus avoiding the request-accounting overhead in many cases.
  • Method Details

    • requestFusion

      default int requestFusion(int requestedMode)
      Description copied from interface: Fuseable.QueueSubscription
      Request a specific fusion mode from this QueueSubscription.

      One should request either SYNC, ASYNC or ANY modes (never NONE) and the implementor should return NONE, SYNC or ASYNC (never ANY).

      For example, if a source supports only ASYNC fusion but the intermediate operator supports only SYNC fuseable sources, the operator may request SYNC fusion and the source can reject it via NONE, thus the operator can return NONE as well to downstream and the fusion doesn't happen.

      Specified by:
      requestFusion in interface Fuseable.QueueSubscription<T>
      Parameters:
      requestedMode - the mode requested by the intermediate operator
      Returns:
      the actual fusion mode activated