public class GremlinDynamoRequestInterceptor
extends com.amazonaws.handlers.RequestHandler2
TrafficCoordinates
and for all calls to get instrumented without a call-site reference.
It also transparently handles timeout calculations. It limits the amount of Gremlin latency to
the Dynamo timeoutConstructor and Description |
---|
GremlinDynamoRequestInterceptor(GremlinService gremlinService,
int clientExecutionTimeout,
int clientRequestTimeout)
Construct on instance of this interceptor.
|
Modifier and Type | Method and Description |
---|---|
com.amazonaws.AmazonWebServiceRequest |
beforeExecution(com.amazonaws.AmazonWebServiceRequest request) |
void |
beforeRequest(com.amazonaws.Request<?> request) |
public GremlinDynamoRequestInterceptor(GremlinService gremlinService, int clientExecutionTimeout, int clientRequestTimeout)
gremlinService
- instance of GremlinService
that handles communication to GremlinclientExecutionTimeout
- timeout you've configured for DynamoDB executionclientRequestTimeout
- timeout you've configured for DynamoDB requestpublic com.amazonaws.AmazonWebServiceRequest beforeExecution(com.amazonaws.AmazonWebServiceRequest request)
beforeExecution
in interface com.amazonaws.handlers.IRequestHandler2
beforeExecution
in class com.amazonaws.handlers.RequestHandler2
public void beforeRequest(com.amazonaws.Request<?> request)
beforeRequest
in interface com.amazonaws.handlers.IRequestHandler2
beforeRequest
in class com.amazonaws.handlers.RequestHandler2