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
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.
-
Field Summary
Fields inherited from interface reactor.core.Fuseable.QueueSubscription
NOT_SUPPORTED_MESSAGE -
Method Summary
Modifier and TypeMethodDescriptiondefault intrequestFusion(int requestedMode) Request a specific fusion mode from this QueueSubscription.Methods inherited from interface java.util.Collection
clear, equals, hashCode, isEmpty, parallelStream, removeIf, size, spliterator, stream, toArrayMethods inherited from interface reactor.core.Fuseable.QueueSubscription
add, addAll, contains, containsAll, element, iterator, offer, peek, remove, remove, removeAll, retainAll, toArray, toArrayMethods inherited from interface org.reactivestreams.Subscription
cancel, request
-
Method Details
-
requestFusion
default int requestFusion(int requestedMode) Description copied from interface:Fuseable.QueueSubscriptionRequest 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:
requestFusionin interfaceFuseable.QueueSubscription<T>- Parameters:
requestedMode- the mode requested by the intermediate operator- Returns:
- the actual fusion mode activated
-