Top Inners Fields Constructors Methods
reactor.core.publisher

pack-priv final Class SinkOneMulticast<O>

extends SinkEmptyMulticast<O>
implements InternalOneSink<O>
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.InternalOneSink, reactor.core.publisher.InternalEmptySink, reactor.core.publisher.ContextHolder, reactor.core.publisher.Sinks.Empty, reactor.core.Scannable, reactor.core.publisher.Sinks.One
Imports
java.time.Duration, reactor.core.CoreSubscriber, reactor.core.publisher.Sinks.EmitResult, reactor.util.annotation.Nullable

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final SinkEmptyMulticast.Inner<T>[]
pack-priv O
Inherited from reactor.core.publisher.SinkEmptyMulticast:
EMPTYerrorSTATE_ADDEDSTATE_EMPTYSTATE_ERRORsubscribersSUBSCRIBERSTERMINATED_EMPTYTERMINATED_ERROR

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
public O
block(Duration
maximum time period to wait for before raising a RuntimeException
timeout
)

Overrides reactor.core.publisher.Mono.block.

Subscribe to this Mono and block until a next signal is received or a timeout expires.
pack-priv boolean
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.SinkEmptyMulticast.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(final CoreSubscriber<? super O>
the Subscriber interested into the published sequence
actual
)

Overrides reactor.core.publisher.SinkEmptyMulticast.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
public Sinks.EmitResult
tryEmitValue(O
the value to emit and complete with, or null to only trigger an onComplete
value
)

Implements reactor.core.publisher.Sinks.One.tryEmitValue.

Try to complete the Mono with an element, generating an onNext signal immediately followed by an onComplete signal.
Inherited from reactor.core.publisher.SinkEmptyMulticast:
asMonocurrentContextcurrentSubscriberCountinnersremovetryEmitEmptytryEmitError

Field Detail

STATE_VALUEback to summary
pack-priv static final int STATE_VALUE
TERMINATED_VALUEback to summary
pack-priv static final SinkEmptyMulticast.Inner<T>[] TERMINATED_VALUE
Annotations
@SuppressWarnings:rawtypes
valueback to summary
pack-priv O value
Annotations
@Nullable

Constructor Detail

SinkOneMulticastback to summary
pack-priv SinkOneMulticast()

Method Detail

addback to summary
pack-priv int add(SinkEmptyMulticast.Inner<O> ps)

Overrides reactor.core.publisher.SinkEmptyMulticast.add.

Annotations
@Override
blockback to summary
public O block(Duration timeout)

Overrides reactor.core.publisher.Mono.block.

Doc from reactor.core.publisher.Mono.block.

Subscribe to this Mono and block until a next signal is received or a timeout expires. Returns that value, or null if the Mono completes empty. In case the Mono errors, the original exception is thrown (wrapped in a RuntimeException if it was a checked exception). If the provided timeout expires, a RuntimeException is thrown.

Note that each block() will trigger a new subscription: in other words, the result might miss signal from hot publishers.

Parameters
timeout:Duration

maximum time period to wait for before raising a RuntimeException

Returns:O

T the result

Annotations
@Nullable
@Override
isTerminatedback to summary
pack-priv boolean isTerminated(SinkEmptyMulticast.Inner<?>[] array)

Overrides reactor.core.publisher.SinkEmptyMulticast.isTerminated.

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.SinkEmptyMulticast.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
subscribeback to summary
public void subscribe(final CoreSubscriber<? super O> actual)

Overrides reactor.core.publisher.SinkEmptyMulticast.subscribe.

Implements reactor.core.CorePublisher.subscribe.

Doc from reactor.core.publisher.Mono.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.

In addition to behave as expected by Publisher#subscribe(Subscriber) in a controlled manner, it supports direct subscribe-time Context passing.

Parameters
actual:CoreSubscriber<? super O>

the Subscriber interested into the published sequence

Annotations
@Override
tryEmitValueback to summary
public Sinks.EmitResult tryEmitValue(O value)

Implements reactor.core.publisher.Sinks.One.tryEmitValue.

Doc from reactor.core.publisher.Sinks.One.tryEmitValue.

Try to complete the Mono with an element, generating an onNext signal immediately followed by an onComplete signal. A null value will only trigger the onComplete. The result of the attempt is represented as an EmitResult, which possibly indicates error cases.

See the list of failure EmitResult in emitValue(Object, EmitFailureHandler) javadoc for an example of how each of these can be dealt with, to decide if the emit API would be a good enough fit instead.

Might throw an unchecked exception as a last resort (eg. in case of a fatal error downstream which cannot be propagated to any asynchronous handler, a bubbling exception, ...).

Parameters
value:O

the value to emit and complete with, or null to only trigger an onComplete

Returns:Sinks.EmitResult

an EmitResult, which should be checked to distinguish different possible failures

Annotations
@Override
reactor.core.publisher back to summary

pack-priv final Class SinkOneMulticast.NextInner<T>

extends Operators.MonoInnerProducerBase<T>
implements SinkEmptyMulticast.Inner<T>
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.SinkEmptyMulticast.Inner, reactor.core.publisher.InnerProducer, org.reactivestreams.Subscription, reactor.core.Scannable

Field Summary

Modifier and TypeField and Description
pack-priv final SinkOneMulticast<T>

Constructor Summary

AccessConstructor and Description
pack-priv
NextInner(CoreSubscriber<? super T> actual, SinkOneMulticast<T> parent)

Method Summary

Modifier and TypeMethod and Description
protected void
doOnCancel()

Overrides reactor.core.publisher.Operators.MonoInnerProducerBase.doOnCancel.

Hook for subclasses, called as the first operation when cancel() is called.
public void
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.Operators.MonoInnerProducerBase.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from reactor.core.publisher.Operators.MonoInnerProducerBase:
actualcancelcompletecompletediscarddiscardTheValuedoOnCompletedoOnRequestisCancelledrequestsetValue

Field Detail

parentback to summary
pack-priv final SinkOneMulticast<T> parent

Constructor Detail

NextInnerback to summary
pack-priv NextInner(CoreSubscriber<? super T> actual, SinkOneMulticast<T> parent)

Method Detail

doOnCancelback to summary
protected void doOnCancel()

Overrides reactor.core.publisher.Operators.MonoInnerProducerBase.doOnCancel.

Doc from reactor.core.publisher.Operators.MonoInnerProducerBase.doOnCancel.

Hook for subclasses, called as the first operation when cancel() is called. Default implementation is a no-op.

Annotations
@Override
errorback to summary
public void error(Throwable t)

Implements reactor.core.publisher.SinkEmptyMulticast.Inner.error.

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.Operators.MonoInnerProducerBase.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override