Top Fields Constructors Methods
reactor.core.publisher

pack-priv Class SinkEmptySerialized<T>

extends AbstractSerializedSink
implements InternalEmptySink<T>, ContextHolder
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.ContextHolder, reactor.core.publisher.InternalEmptySink, reactor.core.publisher.Sinks.Empty, reactor.core.Scannable
Known Direct Subclasses
reactor.core.publisher.SinkOneSerialized
Imports
reactor.core.Scannable, reactor.core.publisher.Sinks.EmitResult, .Sinks.Empty, reactor.util.context.Context, java.util.Objects, java.util.stream.Stream

Field Summary

Modifier and TypeField and Description
pack-priv final ContextHolder
pack-priv final Sinks.Empty<T>
Inherited from reactor.core.publisher.SinksSpecs.AbstractSerializedSink:
LOCKED_ATlockedAtwipWIP

Constructor Summary

AccessConstructor and Description
pack-priv
SinkEmptySerialized(Sinks.Empty<T> sink, ContextHolder contextHolder)

Method Summary

Modifier and TypeMethod and Description
public Mono<T>
asMono()

Implements reactor.core.publisher.Sinks.Empty.asMono.

Return a Mono view of this sink.
public Context
currentContext()

Implements reactor.core.publisher.ContextHolder.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
public int
currentSubscriberCount()

Implements reactor.core.publisher.Sinks.Empty.currentSubscriberCount.

Get how many Subscribers are currently subscribed to the sink.
public Stream<? extends Scannable>
inners()

Overrides default reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public final Sinks.EmitResult
tryEmitEmpty()

Implements reactor.core.publisher.Sinks.Empty.tryEmitEmpty.

Try to complete the Mono without a value, generating only an onComplete signal.
public final Sinks.EmitResult
tryEmitError(Throwable
the exception to signal, not null
t
)

Implements reactor.core.publisher.Sinks.Empty.tryEmitError.

Try to fail the Mono, generating only an onError signal.
Inherited from reactor.core.publisher.SinksSpecs.AbstractSerializedSink:
tryAcquire

Field Detail

contextHolderback to summary
pack-priv final ContextHolder contextHolder
sinkback to summary
pack-priv final Sinks.Empty<T> sink

Constructor Detail

SinkEmptySerializedback to summary
pack-priv SinkEmptySerialized(Sinks.Empty<T> sink, ContextHolder contextHolder)

Method Detail

asMonoback to summary
public Mono<T> asMono()

Implements reactor.core.publisher.Sinks.Empty.asMono.

Doc from reactor.core.publisher.Sinks.Empty.asMono.

Return a Mono view of this sink. Every call returns the same instance.

Returns:Mono<T>

the Mono view associated to this Sinks.One

Annotations
@Override
currentContextback to summary
public Context currentContext()

Implements reactor.core.publisher.ContextHolder.currentContext.

Doc from reactor.core.publisher.ContextHolder.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.

Returns:Context

a resolved context

Annotations
@Override
currentSubscriberCountback to summary
public int currentSubscriberCount()

Implements reactor.core.publisher.Sinks.Empty.currentSubscriberCount.

Doc from reactor.core.publisher.Sinks.Empty.currentSubscriberCount.

Get how many Subscribers are currently subscribed to the sink.

This is a best effort peek at the sink state, and a subsequent attempt at emitting to the sink might still return EmitResult#FAIL_ZERO_SUBSCRIBER where relevant. Request (and lack thereof) isn't taken into account, all registered subscribers are counted.

Returns:int

the number of active subscribers at the time of invocation

Annotations
@Override
innersback to summary
public Stream<? extends Scannable> inners()

Overrides default reactor.core.Scannable.inners.

Doc from reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)

Returns:Stream<? extends Scannable>

a Stream of referenced inners (flatmap, multicast etc)

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

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
tryEmitEmptyback to summary
public final Sinks.EmitResult tryEmitEmpty()

Implements reactor.core.publisher.Sinks.Empty.tryEmitEmpty.

Doc from reactor.core.publisher.Sinks.Empty.tryEmitEmpty.

Try to complete the Mono without a value, generating only an onComplete signal. The result of the attempt is represented as an EmitResult, which possibly indicates error cases.

See the list of failure EmitResult in emitEmpty(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.

Returns:Sinks.EmitResult

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

Annotations
@Override
tryEmitErrorback to summary
public final Sinks.EmitResult tryEmitError(Throwable t)

Implements reactor.core.publisher.Sinks.Empty.tryEmitError.

Doc from reactor.core.publisher.Sinks.Empty.tryEmitError.

Try to fail the Mono, generating only an onError signal. The result of the attempt is represented as an EmitResult, which possibly indicates error cases.

See the list of failure EmitResult in emitError(Throwable, 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.

Parameters
t:Throwable

the exception to signal, not null

Returns:Sinks.EmitResult

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

Annotations
@Override