Top Description Inners Fields Methods
reactor.core

public Interface Fuseable

Known Direct Implementers
reactor.core.publisher.ConnectableFluxOnAssembly, reactor.core.publisher.ConnectableLiftFuseable, reactor.core.publisher.MonoDelayElement.DelayElementSubscriber, reactor.core.publisher.MonoDoFirstFuseable, reactor.core.publisher.MonoDoOnEachFuseable, reactor.core.publisher.MonoElapsed, reactor.core.publisher.MonoElementAt, reactor.core.publisher.MonoFilterFuseable, reactor.core.publisher.MonoFilterWhen.MonoFilterWhenMain, reactor.core.publisher.MonoFlatMap, reactor.core.publisher.MonoFlatMap.FlatMapMain, reactor.core.publisher.MonoFlattenIterable, reactor.core.publisher.MonoHandleFuseable, reactor.core.publisher.MonoUsing, reactor.core.publisher.MonoWhen.WhenCoordinator, reactor.core.publisher.MonoZip.ZipCoordinator, reactor.core.publisher.Operators.MonoSubscriber, reactor.core.publisher.Operators.BaseFluxToMonoOperator, reactor.core.publisher.ParallelCollect, reactor.core.publisher.ParallelFluxOnAssembly, reactor.core.publisher.ParallelGroup, reactor.core.publisher.ParallelLiftFuseable, reactor.core.publisher.FluxNameFuseable, reactor.core.publisher.FluxOnAssembly, reactor.core.publisher.FluxOnBackpressureBuffer, reactor.core.publisher.FluxPeekFuseable, reactor.core.publisher.FluxPublishMulticast, reactor.core.publisher.FluxPublishOn, reactor.core.publisher.FluxContextWrite, reactor.core.publisher.FluxMetricsFuseable, reactor.core.publisher.FluxMetricsFuseable.MetricsFuseableSubscriber, reactor.core.publisher.FluxRange, reactor.core.publisher.FluxSubscribeOnCallable, reactor.core.publisher.MonoCurrentContext, reactor.core.publisher.MonoHasElement, reactor.core.publisher.MonoTapFuseable, reactor.core.publisher.FluxDistinctFuseable, reactor.core.publisher.FluxDoFirstFuseable, reactor.core.publisher.FluxDoOnEach.DoOnEachFuseableSubscriber, reactor.core.publisher.FluxDoOnEachFuseable, reactor.core.publisher.FluxElapsed, reactor.core.publisher.FluxFilterFuseable, reactor.core.publisher.FluxFlattenIterable, reactor.core.publisher.FluxSubscribeOnValue, reactor.core.publisher.FluxTakeFuseable, reactor.core.publisher.FluxTakeLastOne, reactor.core.publisher.FluxTapFuseable, reactor.core.publisher.MonoNameFuseable, reactor.core.publisher.MonoOnAssembly, reactor.core.publisher.MonoPeekFuseable, reactor.core.publisher.MonoPeekTerminal, reactor.core.publisher.MonoPublishMulticast, reactor.core.publisher.MonoReduce, reactor.core.publisher.MonoReduce.ReduceSubscriber, reactor.core.publisher.MonoReduceSeed, reactor.core.publisher.ParallelMergeReduce, reactor.core.publisher.ParallelMergeReduce.MergeReduceMain, reactor.core.publisher.ParallelReduceSeed, reactor.core.publisher.ParallelThen, reactor.core.publisher.ParallelThen.ThenMain, reactor.core.publisher.ReplayProcessor, reactor.core.publisher.MonoAll, reactor.core.publisher.MonoAny, reactor.core.publisher.MonoCallable, reactor.core.publisher.MonoCallable.MonoCallableSubscription, reactor.core.publisher.MonoCollect, reactor.core.publisher.MonoCollectList, reactor.core.publisher.MonoContextWrite, reactor.core.publisher.MonoCount, reactor.core.publisher.FluxArray, reactor.core.publisher.FluxAutoConnectFuseable, reactor.core.publisher.FluxCallable, reactor.core.publisher.FluxCallableOnAssembly, reactor.core.publisher.FluxCombineLatest, reactor.core.publisher.FluxGenerate, reactor.core.publisher.FluxGroupBy, reactor.core.publisher.FluxGroupBy.UnicastGroupedFlux, reactor.core.publisher.FluxHandleFuseable, reactor.core.publisher.FluxIndexFuseable, reactor.core.publisher.FluxIterable, reactor.core.publisher.FluxJust, reactor.core.publisher.FluxLiftFuseable, reactor.core.publisher.FluxLogFuseable, reactor.core.publisher.FluxMapFuseable, reactor.core.publisher.MonoHasElements, reactor.core.publisher.MonoJust, reactor.core.publisher.MonoLiftFuseable, reactor.core.publisher.MonoLogFuseable, reactor.core.publisher.MonoMapFuseable, reactor.core.publisher.MonoMetricsFuseable, reactor.core.publisher.MonoMetricsFuseable.MetricsFuseableSubscriber, reactor.core.publisher.FluxRefCount, reactor.core.publisher.FluxRefCountGrace, reactor.core.publisher.FluxReplay, reactor.core.publisher.FluxSourceFuseable, reactor.core.publisher.FluxSourceMonoFuseable, reactor.core.publisher.FluxStream, reactor.core.publisher.MonoSourceFluxFuseable, reactor.core.publisher.MonoSourceFuseable, reactor.core.publisher.MonoStreamCollector, reactor.core.publisher.MonoSubscribeOnCallable, reactor.core.publisher.MonoSupplier, reactor.core.publisher.MonoSupplier.MonoSupplierSubscription, reactor.core.publisher.MonoTakeLastOne, reactor.core.publisher.SinkManyReplayProcessor, reactor.core.publisher.SinkManyUnicast, reactor.core.publisher.UnicastProcessor, reactor.core.publisher.FluxUsing, reactor.core.publisher.FluxWindowPredicate, reactor.core.publisher.FluxWindowPredicate.WindowFlux, reactor.core.publisher.FluxZip.ZipScalarCoordinator, reactor.core.publisher.GroupedLiftFuseable
Imports
java.util.Collection, .Iterator, .Queue, java.util.concurrent.Callable, org.reactivestreams.Subscriber, .Subscription, reactor.util.annotation.Nullable

A micro API for stream fusion, in particular marks producers that support a QueueSubscription.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Fuseable.ConditionalSubscriber<
the value type
T
>

A subscriber variant that can immediately tell if it consumed the value or not, directly allowing a new value to be sent if it didn't.

public static interface
Fuseable.QueueSubscription<
the value type emitted
T
>

Support contract for queue-fusion based optimizations on subscriptions.

public static interface
Fuseable.ScalarCallable<
the value type returned
T
>

Marker interface indicating that the target can return a value or null, otherwise fail immediately and thus a viable target for assembly-time optimizations.

public static interface
Fuseable.SynchronousSubscription<
the content value type
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.

Field Summary

Modifier and TypeField and Description
public static final int
ANY

Indicates the QueueSubscription should decide what fusion it performs (input only).

public static final int
ASYNC

Indicates the QueueSubscription can perform only async-fusion.

public static final int
NONE

Indicates the QueueSubscription can't support the requested mode.

public static final int
SYNC

Indicates the QueueSubscription can perform sync-fusion.

public static final int
THREAD_BARRIER

Indicates that the queue will be drained from another thread thus any queue-exit computation may be invalid at that point.

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a human-readable String representation of the code
fusionModeName
(int
the fusion mode int code
mode
)

Attempt to convert a fusion mode int code into a human-readable representation.

public static String

Returns:

a human-readable String representation of the code
fusionModeName
(int
the fusion mode int code
mode
,
boolean
whether or not to ignore the THREAD_BARRIER flag in the representation
ignoreThreadBarrier
)

Attempt to convert a fusion mode int code into a human-readable representation.

Field Detail

ANYback to summary
public static final int ANY

Indicates the QueueSubscription should decide what fusion it performs (input only).

ASYNCback to summary
public static final int ASYNC

Indicates the QueueSubscription can perform only async-fusion.

NONEback to summary
public static final int NONE

Indicates the QueueSubscription can't support the requested mode.

SYNCback to summary
public static final int SYNC

Indicates the QueueSubscription can perform sync-fusion.

THREAD_BARRIERback to summary
public static final int THREAD_BARRIER

Indicates that the queue will be drained from another thread thus any queue-exit computation may be invalid at that point.

For example, an asyncSource.map().publishOn().subscribe() sequence where asyncSource is async-fuseable: publishOn may fuse the whole sequence into a single Queue. That in turn could invoke the mapper function from its poll() method from another thread, whereas the unfused sequence would have invoked the mapper on the previous thread. If such mapper invocation is costly, it would escape its thread boundary this way.

Method Detail

fusionModeNameback to summary
public static String fusionModeName(int mode)

Attempt to convert a fusion mode int code into a human-readable representation. Note that this can include the THREAD_BARRIER flag, as an appended +THREAD_BARRIER.

This method accepts -1 as a special code, mainly for the benefit of supporting testing scenarios where fusion can be entirely deactivated (returns Disabled). Other negative values and unknown positive codes on the other hand return Unknown(x).

Note that as this is a human-facing representation, the different values could evolve in the future. As such, never compare the returned string to a constant, but always use this method on both sides of a comparison.

Parameters
mode:int

the fusion mode int code

Returns:String

a human-readable String representation of the code

fusionModeNameback to summary
public static String fusionModeName(int mode, boolean ignoreThreadBarrier)

Attempt to convert a fusion mode int code into a human-readable representation. Note that this can include the THREAD_BARRIER flag, as an appended +THREAD_BARRIER, unless the ignoreThreadBarrier parameter is set to true.

This method accepts -1 as a special code, mainly for the benefit of supporting testing scenarios where fusion can be entirely deactivated (returns Disabled). Other negative values and unknown positive codes on the other hand return Unknown(x).

Note that as this is a human-facing representation, the different values could evolve in the future. As such, never compare the returned string to a constant, but always use this method on both sides of a comparison.

Parameters
mode:int

the fusion mode int code

ignoreThreadBarrier:boolean

whether or not to ignore the THREAD_BARRIER flag in the representation

Returns:String

a human-readable String representation of the code

reactor.core back to summary

public Interface Fuseable.ConditionalSubscriber<T>

extends CoreSubscriber<T>
Known Direct Implementers
reactor.core.publisher.Operators.ConditionalSubscriberAdapter, reactor.core.publisher.FluxOnAssembly.OnAssemblyConditionalSubscriber, reactor.core.publisher.FluxPeekFuseable.PeekFuseableConditionalSubscriber, reactor.core.publisher.FluxPeekFuseable.PeekConditionalSubscriber, reactor.core.publisher.FluxContextWrite.ContextWriteSubscriber, reactor.core.publisher.FluxContextWriteRestoringThreadLocals.ContextWriteRestoringThreadLocalsSubscriber, reactor.core.publisher.FluxDistinct.DistinctSubscriber, reactor.core.publisher.FluxDistinct.DistinctConditionalSubscriber, reactor.core.publisher.FluxDistinct.DistinctFuseableSubscriber, reactor.core.publisher.FluxDistinctUntilChanged.DistinctUntilChangedSubscriber, reactor.core.publisher.FluxDistinctUntilChanged.DistinctUntilChangedConditionalSubscriber, reactor.core.publisher.FluxDoFinally.DoFinallyConditionalSubscriber, reactor.core.publisher.FluxDoOnEach.DoOnEachConditionalSubscriber, reactor.core.publisher.FluxDoOnEach.DoOnEachFuseableConditionalSubscriber, reactor.core.publisher.FluxFilter.FilterSubscriber, reactor.core.publisher.FluxFilter.FilterConditionalSubscriber, reactor.core.publisher.FluxFilterFuseable.FilterFuseableSubscriber, reactor.core.publisher.FluxFilterFuseable.FilterFuseableConditionalSubscriber, reactor.core.publisher.FluxSwitchOnFirst.SwitchOnFirstConditionalMain, reactor.core.publisher.FluxSwitchOnFirst.SwitchOnFirstConditionalControlSubscriber, reactor.core.publisher.FluxTake.TakeConditionalSubscriber, reactor.core.publisher.FluxTap.TapConditionalSubscriber, reactor.core.publisher.FluxTapFuseable.TapConditionalFuseableSubscriber, reactor.core.publisher.FluxTapRestoringThreadLocals.TapSubscriber, reactor.core.publisher.MonoPeekTerminal.MonoTerminalPeekSubscriber, reactor.core.publisher.FluxBufferPredicate.BufferPredicateSubscriber, reactor.core.publisher.FluxHandle.HandleSubscriber, reactor.core.publisher.FluxHandle.HandleConditionalSubscriber, reactor.core.publisher.FluxHandleFuseable.HandleFuseableSubscriber, reactor.core.publisher.FluxHandleFuseable.HandleFuseableConditionalSubscriber, reactor.core.publisher.FluxIndex.IndexConditionalSubscriber, reactor.core.publisher.FluxIndexFuseable.IndexFuseableConditionalSubscriber, reactor.core.publisher.FluxMap.MapConditionalSubscriber, reactor.core.publisher.FluxMapFuseable.MapFuseableConditionalSubscriber, reactor.core.publisher.FluxSkipUntil.SkipUntilSubscriber, reactor.core.publisher.FluxSkipWhile.SkipWhileSubscriber, reactor.core.publisher.FluxUsing.UsingConditionalSubscriber, reactor.core.publisher.FluxUsingWhen.UsingWhenConditionalSubscriber
Type Parameters
<T>
the value type

A subscriber variant that can immediately tell if it consumed the value or not, directly allowing a new value to be sent if it didn't. This avoids the usual request(1) round-trip for dropped values.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if consumed, false if dropped and a new value can be immediately sent
tryOnNext
(T
the value to consume, not null
t
)

Try consuming the value and return true if successful.

Inherited from reactor.core.CoreSubscriber:
currentContextonSubscribe

Method Detail

tryOnNextback to summary
public boolean tryOnNext(T t)

Try consuming the value and return true if successful.

Parameters
t:T

the value to consume, not null

Returns:boolean

true if consumed, false if dropped and a new value can be immediately sent

reactor.core back to summary

public Interface Fuseable.QueueSubscription<T>

extends Queue<T>, Subscription
Known Direct Subinterfaces
reactor.core.Fuseable.SynchronousSubscription, reactor.core.publisher.FluxReplay.ReplaySubscription
Known Direct Implementers
reactor.core.publisher.MonoDelayElement.DelayElementSubscriber, reactor.core.publisher.MonoFilterWhen.MonoFilterWhenMain, reactor.core.publisher.MonoFlatMap.FlatMapMain, reactor.core.publisher.MonoUsing.MonoUsingSubscriber, reactor.core.publisher.MonoWhen.WhenCoordinator, reactor.core.publisher.MonoZip.ZipCoordinator, reactor.core.publisher.Operators.EmptySubscription, reactor.core.publisher.Operators.MonoSubscriber, reactor.core.publisher.Operators.BaseFluxToMonoOperator, reactor.core.publisher.FluxOnAssembly.OnAssemblySubscriber, reactor.core.publisher.FluxOnBackpressureBuffer.BackpressureBufferSubscriber, reactor.core.publisher.FluxPeekFuseable.PeekFuseableSubscriber, reactor.core.publisher.FluxPeekFuseable.PeekFuseableConditionalSubscriber, reactor.core.publisher.FluxPublishMulticast.CancelMulticaster, reactor.core.publisher.FluxPublishMulticast.CancelFuseableMulticaster, reactor.core.publisher.FluxPublishOn.PublishOnSubscriber, reactor.core.publisher.FluxPublishOn.PublishOnConditionalSubscriber, reactor.core.publisher.FluxContextWrite.ContextWriteSubscriber, reactor.core.publisher.FluxMetricsFuseable.MetricsFuseableSubscriber, reactor.core.publisher.FluxSubscribeOnCallable.CallableSubscribeOnSubscription, reactor.core.publisher.FluxContextWriteRestoringThreadLocals.FuseableContextWriteRestoringThreadLocalsSubscriber, reactor.core.publisher.FluxDistinct.DistinctFuseableSubscriber, reactor.core.publisher.FluxDoOnEach.DoOnEachFuseableSubscriber, reactor.core.publisher.FluxElapsed.ElapsedSubscriber, reactor.core.publisher.FluxFilterFuseable.FilterFuseableSubscriber, reactor.core.publisher.FluxFilterFuseable.FilterFuseableConditionalSubscriber, reactor.core.publisher.FluxFlattenIterable.FlattenIterableSubscriber, reactor.core.publisher.FluxSubscribeOnValue.ScheduledScalar, reactor.core.publisher.FluxSubscribeOnValue.ScheduledEmpty, reactor.core.publisher.FluxTake.TakeFuseableSubscriber, reactor.core.publisher.FluxTapFuseable.TapFuseableSubscriber, reactor.core.publisher.MonoPeekTerminal.MonoTerminalPeekSubscriber, reactor.core.publisher.MonoReduce.ReduceSubscriber, reactor.core.publisher.ParallelMergeReduce.MergeReduceMain, reactor.core.publisher.ParallelThen.ThenMain, reactor.core.publisher.MonoCallable.MonoCallableSubscription, reactor.core.publisher.FluxCombineLatest.CombineLatestCoordinator, reactor.core.publisher.FluxGenerate.GenerateSubscription, reactor.core.publisher.FluxGroupBy.GroupByMain, reactor.core.publisher.FluxGroupBy.UnicastGroupedFlux, reactor.core.publisher.FluxHandleFuseable.HandleFuseableSubscriber, reactor.core.publisher.FluxHandleFuseable.HandleFuseableConditionalSubscriber, reactor.core.publisher.FluxHide.SuppressFuseableSubscriber, reactor.core.publisher.FluxIndexFuseable.IndexFuseableSubscriber, reactor.core.publisher.FluxIndexFuseable.IndexFuseableConditionalSubscriber, reactor.core.publisher.FluxMapFuseable.MapFuseableSubscriber, reactor.core.publisher.FluxMapFuseable.MapFuseableConditionalSubscriber, reactor.core.publisher.MonoMetricsFuseable.MetricsFuseableSubscriber, reactor.core.publisher.FluxRefCount.RefCountInner, reactor.core.publisher.FluxRefCountGrace.RefCountInner, reactor.core.publisher.MonoSupplier.MonoSupplierSubscription, reactor.core.publisher.SinkManyUnicast, reactor.core.publisher.UnicastProcessor, reactor.core.publisher.FluxUsing.UsingSubscriber, reactor.core.publisher.FluxUsing.UsingFuseableSubscriber, reactor.core.publisher.FluxUsing.UsingConditionalSubscriber, reactor.core.publisher.FluxWindowPredicate.WindowPredicateMain, reactor.core.publisher.FluxWindowPredicate.WindowFlux, reactor.core.publisher.FluxZip.ZipScalarCoordinator
Type Parameters
<T>
the value type emitted

Support contract for queue-fusion based optimizations on subscriptions.

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public default boolean
add(T
the element to add
t
)

Implements java.util.Queue.add.

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.
public default boolean
addAll(Collection<? extends T>
collection containing elements to be added to this collection
c
)

Implements java.util.Collection.addAll.

Adds all of the elements in the specified collection to this collection (optional operation).
public default boolean
contains(Object
element whose presence in this collection is to be tested
o
)

Implements java.util.Collection.contains.

Returns true if this collection contains the specified element.
public default boolean
containsAll(Collection<?>
collection to be checked for containment in this collection
c
)

Implements java.util.Collection.containsAll.

Returns true if this collection contains all of the elements in the specified collection.
public default T
element()

Implements java.util.Queue.element.

Retrieves, but does not remove, the head of this queue.
public default Iterator<T>
iterator()

Implements java.util.Collection.iterator.

Returns an iterator over the elements in this collection.
public default boolean
offer(T
the element to add
t
)

Implements java.util.Queue.offer.

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.
public default T
peek()

Implements java.util.Queue.peek.

Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
public default T
remove()

Implements java.util.Queue.remove.

Retrieves and removes the head of this queue.
public default boolean
remove(Object
element to be removed from this collection, if present
o
)

Implements java.util.Collection.remove.

Removes a single instance of the specified element from this collection, if it is present (optional operation).
public default boolean
removeAll(Collection<?>
collection containing elements to be removed from this collection
c
)

Implements java.util.Collection.removeAll.

Removes all of this collection's elements that are also contained in the specified collection (optional operation).
public int

Returns:

the actual fusion mode activated
requestFusion
(int
the mode requested by the intermediate operator
requestedMode
)

Request a specific fusion mode from this QueueSubscription.

public default boolean
retainAll(Collection<?>
collection containing elements to be retained in this collection
c
)

Implements java.util.Collection.retainAll.

Retains only the elements in this collection that are contained in the specified collection (optional operation).
public default Object[]
toArray()

Implements java.util.Collection.toArray.

Returns an array containing all of the elements in this collection.
public default <T1> T1[]
toArray(T1[]
the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
a
)

Implements java.util.Collection.toArray.

Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
Inherited from java.util.Queue:
poll
Inherited from org.reactivestreams.Subscription:
cancelrequest

Field Detail

NOT_SUPPORTED_MESSAGEback to summary
public static final String NOT_SUPPORTED_MESSAGE

Method Detail

addback to summary
public default boolean add(T t)

Implements java.util.Queue.add.

Doc from java.util.Queue.add.

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.

Parameters
t:T

the element to add

Returns:boolean

true (as specified by Collection#add)

Annotations
@Override
addAllback to summary
public default boolean addAll(Collection<? extends T> c)

Implements java.util.Collection.addAll.

Doc from java.util.Collection.addAll.

Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.) If the specified collection has a defined encounter order, processing of its elements generally occurs in that order.

Parameters
c:Collection<? extends T>

collection containing elements to be added to this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Override
containsback to summary
public default boolean contains(Object o)

Implements java.util.Collection.contains.

Doc from java.util.Collection.contains.

Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that Objects.equals(o, e).

Parameters
o:Object

element whose presence in this collection is to be tested

Returns:boolean

true if this collection contains the specified element

Annotations
@Override
containsAllback to summary
public default boolean containsAll(Collection<?> c)

Implements java.util.Collection.containsAll.

Doc from java.util.Collection.containsAll.

Returns true if this collection contains all of the elements in the specified collection.

Parameters
c:Collection<?>

collection to be checked for containment in this collection

Returns:boolean

true if this collection contains all of the elements in the specified collection

Annotations
@Override
elementback to summary
public default T element()

Implements java.util.Queue.element.

Doc from java.util.Queue.element.

Retrieves, but does not remove, the head of this queue. This method differs from peek only in that it throws an exception if this queue is empty.

Returns:T

the head of this queue

Annotations
@Override
iteratorback to summary
public default Iterator<T> iterator()

Implements java.util.Collection.iterator.

Doc from java.util.Collection.iterator.

Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee).

Returns:Iterator<T>

an Iterator over the elements in this collection

Annotations
@Override
offerback to summary
public default boolean offer(T t)

Implements java.util.Queue.offer.

Doc from java.util.Queue.offer.

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted queue, this method is generally preferable to add, which can fail to insert an element only by throwing an exception.

Parameters
t:T

the element to add

Returns:boolean

true if the element was added to this queue, else false

Annotations
@Override
peekback to summary
public default T peek()

Implements java.util.Queue.peek.

Doc from java.util.Queue.peek.

Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.

Returns:T

the head of this queue, or null if this queue is empty

Annotations
@Override
@Nullable
removeback to summary
public default T remove()

Implements java.util.Queue.remove.

Doc from java.util.Queue.remove.

Retrieves and removes the head of this queue. This method differs from poll() only in that it throws an exception if this queue is empty.

Returns:T

the head of this queue

Annotations
@Override
removeback to summary
public default boolean remove(Object o)

Implements java.util.Collection.remove.

Doc from java.util.Collection.remove.

Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that Objects.equals(o, e), if this collection contains one or more such elements. Returns true if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).

Parameters
o:Object

element to be removed from this collection, if present

Returns:boolean

true if an element was removed as a result of this call

Annotations
@Override
removeAllback to summary
public default boolean removeAll(Collection<?> c)

Implements java.util.Collection.removeAll.

Doc from java.util.Collection.removeAll.

Removes all of this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.

Parameters
c:Collection<?>

collection containing elements to be removed from this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Override
requestFusionback to summary
public int requestFusion(int requestedMode)

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.

Parameters
requestedMode:int

the mode requested by the intermediate operator

Returns:int

the actual fusion mode activated

retainAllback to summary
public default boolean retainAll(Collection<?> c)

Implements java.util.Collection.retainAll.

Doc from java.util.Collection.retainAll.

Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.

Parameters
c:Collection<?>

collection containing elements to be retained in this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Override
toArrayback to summary
public default Object[] toArray()

Implements java.util.Collection.toArray.

Doc from java.util.Collection.toArray.

Returns an array containing all of the elements in this collection. If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. The returned array's runtime component type is Object.

The returned array will be "safe" in that no references to it are maintained by this collection. (In other words, this method must allocate a new array even if this collection is backed by an array). The caller is thus free to modify the returned array.

Returns:Object[]

an array, whose runtime component type is Object, containing all of the elements in this collection

Annotations
@Override
toArrayback to summary
public default <T1> T1[] toArray(T1[] a)

Implements java.util.Collection.toArray.

Doc from java.util.Collection.toArray.

Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.

If this collection fits in the specified array with room to spare (i.e., the array has more elements than this collection), the element in the array immediately following the end of the collection is set to null. (This is useful in determining the length of this collection only if the caller knows that this collection does not contain any null elements.)

If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

Parameters
<T1>
the component type of the array to contain the collection
a:T1[]

the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.

Returns:T1[]

an array containing all of the elements in this collection

Annotations
@Override
reactor.core back to summary

public Interface Fuseable.ScalarCallable<T>

extends Callable<T>
Known Direct Implementers
reactor.core.publisher.MonoEmpty, reactor.core.publisher.MonoError, reactor.core.publisher.MonoErrorSupplied, reactor.core.publisher.FluxEmpty, reactor.core.publisher.FluxError, reactor.core.publisher.FluxErrorSupplied, reactor.core.publisher.FluxJust, reactor.core.publisher.MonoJust
Type Parameters
<T>
the value type returned

Marker interface indicating that the target can return a value or null, otherwise fail immediately and thus a viable target for assembly-time optimizations.

Method Summary

Inherited from java.util.concurrent.Callable:
call
reactor.core back to summary

public Interface Fuseable.SynchronousSubscription<T>

extends Fuseable.QueueSubscription<T>
Known Direct Implementers
reactor.core.publisher.Operators.ScalarSubscription, reactor.core.publisher.FluxRange.RangeSubscription, reactor.core.publisher.FluxRange.RangeSubscriptionConditional, reactor.core.publisher.FluxArray.ArraySubscription, reactor.core.publisher.FluxArray.ArrayConditionalSubscription, reactor.core.publisher.FluxIterable.IterableSubscription, reactor.core.publisher.FluxIterable.IterableSubscriptionConditional
Type Parameters
<T>
the content value type

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

Inherited from reactor.core.Fuseable.QueueSubscription:
NOT_SUPPORTED_MESSAGE

Method Summary

Modifier and TypeMethod and Description
public default int
requestFusion(int
the mode requested by the intermediate operator
requestedMode
)

Implements reactor.core.Fuseable.QueueSubscription.requestFusion.

Request a specific fusion mode from this QueueSubscription.
Inherited from reactor.core.Fuseable.QueueSubscription:
addaddAllcontainscontainsAllelementiteratorofferpeekremoveremoveremoveAllretainAlltoArraytoArray

Method Detail

requestFusionback to summary
public default int requestFusion(int requestedMode)

Implements reactor.core.Fuseable.QueueSubscription.requestFusion.

Doc from reactor.core.Fuseable.QueueSubscription.requestFusion.

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.

Parameters
requestedMode:int

the mode requested by the intermediate operator

Returns:int

the actual fusion mode activated

Annotations
@Override