RequestInterceptor that hooks into request lifecycle and calls methods of the parent
class to manage tracking state and expose WeightedStats.
This interceptor the default mechanism for gathering stats when WeightedLoadbalanceStrategy is used with LoadbalanceRSocketClient.
LoadbalanceRSocketClient, WeightedLoadbalanceStrategy
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Int2LongHashMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public final void | onCancel(int
used by this request streamId, FrameType of the request. Must be one of the following types requestType)FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNELImplements io. |
| public final void | onReject(Throwable
exception which causes rejection of a particular request rejectionReason, FrameType of the request. Must be one of the following types requestType, ByteBuf FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNELtaken from the initial frame metadata)Implements io. |
| public final void | onStart(int
used for the request streamId, FrameType of the request. Must be one of the following types requestType, ByteBuf FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNELtaken from the initial frame metadata)Implements io. |
| public final void | onTerminate(int
used by this request streamId, FrameType of the request. Must be one of the following types requestType, Throwable FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNELwith which this finished has terminated. Must be one of the following signals t)Implements io. |
| requestsStartTime | back to summary |
|---|---|
| pack-priv final Int2LongHashMap requestsStartTime | |
| WeightedStatsRequestInterceptor | back to summary |
|---|---|
| public WeightedStatsRequestInterceptor() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| onCancel | back to summary |
|---|---|
| public final void onCancel(int streamId, FrameType requestType) Implements io. Doc from io. Method which is being invoked once a successfully accepted request is cancelled. This method
can be invoked only after the
| |
| onReject | back to summary |
|---|---|
| public final void onReject(Throwable rejectionReason, FrameType requestType, ByteBuf metadata) Implements io. Doc from io. Method which is being invoked on the request rejection. This method is being called only if the
actual request can not be started and is called instead of the
| |
| onStart | back to summary |
|---|---|
| public final void onStart(int streamId, FrameType requestType, ByteBuf metadata) Implements io. Doc from io. Method which is being invoked on successful acceptance and start of a request.
| |
| onTerminate | back to summary |
|---|---|
| public final void onTerminate(int streamId, FrameType requestType, Throwable t) Implements io. Doc from io. Method which is being invoked once a successfully accepted request is terminated. This method
can be invoked only after the
| |