Top Description Inners Fields Constructors Methods
io.rsocket.loadbalance

pack-priv final Class PooledRSocket

extends ResolvingOperator<RSocket>
implements CoreSubscriber<RSocket>, RSocket
Class Inheritance
All Implemented Interfaces
io.rsocket.RSocket, io.rsocket.Closeable, reactor.core.Disposable, io.rsocket.Availability, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber
Imports
io.netty.util.ReferenceCountUtil, io.rsocket.Payload, .RSocket, io.rsocket.frame.FrameType, java.util.concurrent.atomic.AtomicReferenceFieldUpdater, org.reactivestreams.Publisher, .Subscription, reactor.core.CoreSubscriber, reactor.core.publisher.Flux, .Mono, .Operators, .Sinks, reactor.util.context.Context

Default implementation of RSocket stored in RSocketPool

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final LoadbalanceTarget
pack-priv final Sinks.Empty<Void>
pack-priv final RSocketPool
pack-priv final Mono<RSocket>
pack-priv volatile Subscription
s

pack-priv static final AtomicReferenceFieldUpdater<PooledRSocket, Subscription>
S

Inherited from io.rsocket.loadbalance.ResolvingOperator:
ADDED_STATEEMPTY_SUBSCRIBEDEMPTY_UNSUBSCRIBEDON_DISPOSEREADYREADY_STATEsubscribersSUBSCRIBERStTERMINATEDTERMINATED_STATEvaluewipWIP

Constructor Summary

AccessConstructor and Description
pack-priv
PooledRSocket(RSocketPool parent, Mono<RSocket> rSocketSource, LoadbalanceTarget loadbalanceTarget)

Method Summary

Modifier and TypeMethod and Description
public double
pack-priv void
protected void
protected void
protected void
protected void
public Mono<Void>
fireAndForget(Payload
Request payload.
payload
)

Overrides default io.rsocket.RSocket.fireAndForget.

Fire and Forget interaction model of RSocket.
public Mono<Void>
metadataPush(Payload
Request payloads.
payload
)

Overrides default io.rsocket.RSocket.metadataPush.

Metadata-Push interaction model of RSocket.
public Mono<Void>
onClose()

Overrides default io.rsocket.RSocket.onClose.

Returns a Mono that terminates when the instance is terminated by any reason.
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(RSocket
the element signaled
value
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
public Flux<Payload>
requestChannel(Publisher<Payload>
Stream of request payloads.
payloads
)

Overrides default io.rsocket.RSocket.requestChannel.

Request-Channel interaction model of RSocket.
public Mono<Payload>
requestResponse(Payload
Request payload.
payload
)

Overrides default io.rsocket.RSocket.requestResponse.

Request-Response interaction model of RSocket.
public Flux<Payload>
requestStream(Payload
Request payload.
payload
)

Overrides default io.rsocket.RSocket.requestStream.

Request-Stream interaction model of RSocket.
pack-priv LoadbalanceTarget
Inherited from io.rsocket.loadbalance.ResolvingOperator:
addblockcompleteconnectdisposedoFinallyinvalidateisDisposedisPendingobserveremoveterminatevalueIfResolved

Field Detail

loadbalanceTargetback to summary
pack-priv final LoadbalanceTarget loadbalanceTarget
onCloseSinkback to summary
pack-priv final Sinks.Empty<Void> onCloseSink
parentback to summary
pack-priv final RSocketPool parent
rSocketSourceback to summary
pack-priv final Mono<RSocket> rSocketSource
sback to summary
pack-priv volatile Subscription s
Sback to summary
pack-priv static final AtomicReferenceFieldUpdater<PooledRSocket, Subscription> S

Constructor Detail

PooledRSocketback to summary
pack-priv PooledRSocket(RSocketPool parent, Mono<RSocket> rSocketSource, LoadbalanceTarget loadbalanceTarget)

Method Detail

availabilityback to summary
public double availability()

Overrides default io.rsocket.RSocket.availability.

Returns:double

Doc from io.rsocket.Availability.availability.

a positive numbers representing the availability of the entity. Higher is better, 0.0 means not available

Annotations
@Override
doCleanupback to summary
pack-priv void doCleanup(Throwable t)
doOnDisposeback to summary
protected void doOnDispose()

Overrides io.rsocket.loadbalance.ResolvingOperator.doOnDispose.

Annotations
@Override
doOnValueExpiredback to summary
protected void doOnValueExpired(RSocket value)

Overrides io.rsocket.loadbalance.ResolvingOperator.doOnValueExpired.

Annotations
@Override
doOnValueResolvedback to summary
protected void doOnValueResolved(RSocket value)

Overrides io.rsocket.loadbalance.ResolvingOperator.doOnValueResolved.

Annotations
@Override
doSubscribeback to summary
protected void doSubscribe()

Overrides io.rsocket.loadbalance.ResolvingOperator.doSubscribe.

Annotations
@Override
fireAndForgetback to summary
public Mono<Void> fireAndForget(Payload payload)

Overrides default io.rsocket.RSocket.fireAndForget.

Doc from io.rsocket.RSocket.fireAndForget.

Fire and Forget interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Mono<Void>

Publisher that completes when the passed payload is successfully handled, otherwise errors.

Annotations
@Override
metadataPushback to summary
public Mono<Void> metadataPush(Payload payload)

Overrides default io.rsocket.RSocket.metadataPush.

Doc from io.rsocket.RSocket.metadataPush.

Metadata-Push interaction model of RSocket.

Parameters
payload:Payload

Request payloads.

Returns:Mono<Void>

Publisher that completes when the passed payload is successfully handled, otherwise errors.

Annotations
@Override
onCloseback to summary
public Mono<Void> onClose()

Overrides default io.rsocket.RSocket.onClose.

Doc from io.rsocket.Closeable.onClose.

Returns a Mono that terminates when the instance is terminated by any reason. Note, in case of error termination, the cause of error will be propagated as an error signal through org.reactivestreams.Subscriber#onError(Throwable). Otherwise, Subscriber#onComplete() will be called.

Returns:Mono<Void>

a Mono to track completion with success or error of the underlying resource. When the underlying resource is an `RSocket`, the Mono exposes stream 0 (i.e. connection level) errors.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(RSocket value)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
value:RSocket

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription s)

Implements reactor.core.CoreSubscriber.onSubscribe.

Doc from reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long). Should further onNext related state modification occur, thread-safety will be required.

Note that an invalid request <= 0 will not produce an onError and will simply be ignored or reported through a debug-enabled reactor.util.Logger. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
requestChannelback to summary
public Flux<Payload> requestChannel(Publisher<Payload> payloads)

Overrides default io.rsocket.RSocket.requestChannel.

Doc from io.rsocket.RSocket.requestChannel.

Request-Channel interaction model of RSocket.

Parameters
payloads:Publisher<Payload>

Stream of request payloads.

Returns:Flux<Payload>

Stream of response payloads.

Annotations
@Override
requestResponseback to summary
public Mono<Payload> requestResponse(Payload payload)

Overrides default io.rsocket.RSocket.requestResponse.

Doc from io.rsocket.RSocket.requestResponse.

Request-Response interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Mono<Payload>

Publisher containing at most a single Payload representing the response.

Annotations
@Override
requestStreamback to summary
public Flux<Payload> requestStream(Payload payload)

Overrides default io.rsocket.RSocket.requestStream.

Doc from io.rsocket.RSocket.requestStream.

Request-Stream interaction model of RSocket.

Parameters
payload:Payload

Request payload.

Returns:Flux<Payload>

Publisher containing the stream of Payloads representing the response.

Annotations
@Override
targetback to summary
pack-priv LoadbalanceTarget target()
io.rsocket.loadbalance back to summary

pack-priv final Class PooledRSocket.FluxInner<INPUT>

extends FluxDeferredResolution<INPUT, RSocket>
Class Inheritance

Field Summary

Inherited from io.rsocket.loadbalance.FluxDeferredResolution:
actualdonefluxOrPayloadparentrequestedREQUESTEDrequestTypesSTATE_SUBSCRIBEDSTATE_SUBSCRIBER_SETSTATE_TERMINATEDSTATE_UNSUBSCRIBED

Constructor Summary

AccessConstructor and Description
pack-priv
FluxInner(PooledRSocket parent, INPUT fluxOrPayload, FrameType requestType)

Method Summary

Modifier and TypeMethod and Description
public void
accept(RSocket
the first input argument
rSocket
,
Throwable
the second input argument
t
)

Implements java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.
Inherited from io.rsocket.loadbalance.FluxDeferredResolution:
cancelcurrentContextisTerminatedonCompleteonErroronNextonSubscriberequestscanUnsafesubscribe

Constructor Detail

FluxInnerback to summary
pack-priv FluxInner(PooledRSocket parent, INPUT fluxOrPayload, FrameType requestType)

Method Detail

acceptback to summary
public void accept(RSocket rSocket, Throwable t)

Implements java.util.function.BiConsumer.accept.

Doc from java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.

Parameters
rSocket:RSocket

the first input argument

t:Throwable

the second input argument

Annotations
@Override
@SuppressWarnings:unchecked
io.rsocket.loadbalance back to summary

pack-priv final Class PooledRSocket.MonoInner<RESULT>

extends MonoDeferredResolution<RESULT, RSocket>
Class Inheritance

Field Summary

Inherited from io.rsocket.loadbalance.MonoDeferredResolution:
actualdoneparentpayloadrequestedREQUESTEDrequestTypesSTATE_SUBSCRIBEDSTATE_SUBSCRIBER_SETSTATE_TERMINATEDSTATE_UNSUBSCRIBED

Constructor Summary

AccessConstructor and Description
pack-priv
MonoInner(PooledRSocket parent, Payload payload, FrameType requestType)

Method Summary

Modifier and TypeMethod and Description
public void
accept(RSocket
the first input argument
rSocket
,
Throwable
the second input argument
t
)

Implements java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.
Inherited from io.rsocket.loadbalance.MonoDeferredResolution:
cancelcurrentContextisTerminatedonCompleteonErroronNextonSubscriberequestscanUnsafesubscribe

Constructor Detail

MonoInnerback to summary
pack-priv MonoInner(PooledRSocket parent, Payload payload, FrameType requestType)

Method Detail

acceptback to summary
public void accept(RSocket rSocket, Throwable t)

Implements java.util.function.BiConsumer.accept.

Doc from java.util.function.BiConsumer.accept.

Performs this operation on the given arguments.

Parameters
rSocket:RSocket

the first input argument

t:Throwable

the second input argument

Annotations
@Override
@SuppressWarnings:unchecked, rawtypes