public static RefreshCacheResultJsonUnmarshaller getInstance() { if (instance == null) instance = new RefreshCacheResultJsonUnmarshaller(); return instance; } }
@SdkInternalApi final RefreshCacheResult executeRefreshCache(RefreshCacheRequest refreshCacheRequest) { ExecutionContext executionContext = createExecutionContext(refreshCacheRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<RefreshCacheRequest> request = null; Response<RefreshCacheResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RefreshCacheRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(refreshCacheRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Storage Gateway"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RefreshCache"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<RefreshCacheResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RefreshCacheResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } }