Package io.dingodb.sdk.service
Class ServiceCallCycles<REQ extends Message.Request,RES extends Message.Response>
java.lang.Object
io.dingodb.sdk.service.ServiceCallCycles<REQ,RES>
- All Implemented Interfaces:
Caller.CallExecutor<REQ,,RES> ServiceCallCycle<REQ,,RES> ServiceCallCycle.After<REQ,,RES> ServiceCallCycle.Before<REQ,,RES> ServiceCallCycle.OnErrRes<REQ,,RES> ServiceCallCycle.OnException<REQ,,RES> ServiceCallCycle.OnFailed<REQ,,RES> ServiceCallCycle.OnIgnore<REQ,,RES> ServiceCallCycle.OnNonConnection<REQ,,RES> ServiceCallCycle.OnRefresh<REQ,,RES> ServiceCallCycle.OnRetry<REQ,,RES> ServiceCallCycle.OnThrow<REQ,,RES> ServiceCallCycle.RAfter<REQ,,RES> ServiceCallCycle.RBefore<REQ,,RES> ServiceCallCycle.RError<REQ,RES>
public class ServiceCallCycles<REQ extends Message.Request,RES extends Message.Response>
extends Object
implements ServiceCallCycle<REQ,RES>, ServiceCallCycle.Before<REQ,RES>, ServiceCallCycle.After<REQ,RES>, ServiceCallCycle.OnException<REQ,RES>, ServiceCallCycle.OnRetry<REQ,RES>, ServiceCallCycle.OnIgnore<REQ,RES>, ServiceCallCycle.OnRefresh<REQ,RES>, ServiceCallCycle.OnThrow<REQ,RES>, ServiceCallCycle.OnNonConnection<REQ,RES>, ServiceCallCycle.OnErrRes<REQ,RES>, ServiceCallCycle.OnFailed<REQ,RES>, ServiceCallCycle.RBefore<REQ,RES>, ServiceCallCycle.RAfter<REQ,RES>, ServiceCallCycle.RError<REQ,RES>, Caller.CallExecutor<REQ,RES>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServiceCallCycles(io.grpc.MethodDescriptor<REQ, RES> method, org.slf4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcall(io.grpc.MethodDescriptor<REQ, RES> method, REQ request, io.grpc.CallOptions options, io.grpc.Channel channel, long trace, ServiceCallCycles<REQ, RES> handlers) onErrStrategy(ErrorCodeUtils.Strategy strategy, int retry, int remain, REQ req, RES res, io.grpc.CallOptions options, String remote, long trace) voidonException(REQ req, Exception ex, io.grpc.CallOptions options, String remote, long trace) voidvoidvoidonNonConnection(REQ req, io.grpc.CallOptions options, long trace) voidvoidvoidonThrow(REQ req, DingoClientException.ExhaustedRetryException ex, io.grpc.CallOptions options, long trace) voidvoidvoid
-
Field Details
-
method
public final io.grpc.MethodDescriptor<REQ extends Message.Request,RES extends Message.Response> method -
logger
public final org.slf4j.Logger logger
-
-
Constructor Details
-
ServiceCallCycles
-
-
Method Details
-
call
public RES call(io.grpc.MethodDescriptor<REQ, RES> method, REQ request, io.grpc.CallOptions options, io.grpc.Channel channel, long trace, ServiceCallCycles<REQ, RES> handlers) - Specified by:
callin interfaceCaller.CallExecutor<REQ extends Message.Request,RES extends Message.Response>
-
before
- Specified by:
beforein interfaceServiceCallCycle.Before<REQ extends Message.Request,RES extends Message.Response>
-
rBefore
- Specified by:
rBeforein interfaceServiceCallCycle.RBefore<REQ extends Message.Request,RES extends Message.Response>
-
after
- Specified by:
afterin interfaceServiceCallCycle.After<REQ extends Message.Request,RES extends Message.Response>
-
rAfter
- Specified by:
rAfterin interfaceServiceCallCycle.RAfter<REQ extends Message.Request,RES extends Message.Response>
-
rError
public void rError(REQ req, io.grpc.CallOptions options, String remote, long trace, String statusMessage) - Specified by:
rErrorin interfaceServiceCallCycle.RError<REQ extends Message.Request,RES extends Message.Response>
-
onErrStrategy
public ErrorCodeUtils.Strategy onErrStrategy(ErrorCodeUtils.Strategy strategy, int retry, int remain, REQ req, RES res, io.grpc.CallOptions options, String remote, long trace) - Specified by:
onErrStrategyin interfaceServiceCallCycle.OnErrRes<REQ extends Message.Request,RES extends Message.Response>
-
onException
public void onException(REQ req, Exception ex, io.grpc.CallOptions options, String remote, long trace) - Specified by:
onExceptionin interfaceServiceCallCycle.OnException<REQ extends Message.Request,RES extends Message.Response>
-
onRetry
- Specified by:
onRetryin interfaceServiceCallCycle.OnRetry<REQ extends Message.Request,RES extends Message.Response>
-
onFailed
- Specified by:
onFailedin interfaceServiceCallCycle.OnFailed<REQ extends Message.Request,RES extends Message.Response>
-
onIgnore
- Specified by:
onIgnorein interfaceServiceCallCycle.OnIgnore<REQ extends Message.Request,RES extends Message.Response>
-
onRefresh
- Specified by:
onRefreshin interfaceServiceCallCycle.OnRefresh<REQ extends Message.Request,RES extends Message.Response>
-
onNonConnection
- Specified by:
onNonConnectionin interfaceServiceCallCycle.OnNonConnection<REQ extends Message.Request,RES extends Message.Response>
-
onThrow
public void onThrow(REQ req, DingoClientException.ExhaustedRetryException ex, io.grpc.CallOptions options, long trace) - Specified by:
onThrowin interfaceServiceCallCycle.OnThrow<REQ extends Message.Request,RES extends Message.Response>
-