com.amazonaws.http.ExecutionContext.setClientExecutionTrackerTask()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中com.amazonaws.http.ExecutionContext.setClientExecutionTrackerTask()方法的一些代码示例,展示了ExecutionContext.setClientExecutionTrackerTask()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.setClientExecutionTrackerTask()方法的具体详情如下:
包路径:com.amazonaws.http.ExecutionContext
类名称:ExecutionContext
方法名:setClientExecutionTrackerTask

ExecutionContext.setClientExecutionTrackerTask介绍

暂无

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
 * Start and end client execution timer around the execution of the request. It's important
 * that the client execution task is canceled before the InterruptedExecption is handled by
 * {@link #execute()} so * the interrupt status doesn't leak out to the callers code
 */
private Response<Output> executeWithTimer() throws InterruptedException {
  ClientExecutionAbortTrackerTask clientExecutionTrackerTask =
      clientExecutionTimer.startTimer(getClientExecutionTimeout(requestConfig));
  try {
    executionContext.setClientExecutionTrackerTask(clientExecutionTrackerTask);
    return doExecute();
  } finally {
    executionContext.getClientExecutionTrackerTask().cancelTask();
  }
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-core

/**
 * Start and end client execution timer around the execution of the request. It's important
 * that the client execution task is canceled before the InterruptedExecption is handled by
 * {@link #execute()} so * the interrupt status doesn't leak out to the callers code
 */
private Response<Output> executeWithTimer() throws InterruptedException {
  ClientExecutionAbortTrackerTask clientExecutionTrackerTask =
      clientExecutionTimer.startTimer(getClientExecutionTimeout(requestConfig));
  try {
    executionContext.setClientExecutionTrackerTask(clientExecutionTrackerTask);
    return doExecute();
  } finally {
    executionContext.getClientExecutionTrackerTask().cancelTask();
  }
}

代码示例来源:origin: Nextdoor/bender

/**
 * Start and end client execution timer around the execution of the request. It's important
 * that the client execution task is canceled before the InterruptedExecption is handled by
 * {@link #execute()} so * the interrupt status doesn't leak out to the callers code
 */
private Response<Output> executeWithTimer() throws InterruptedException {
  ClientExecutionAbortTrackerTask clientExecutionTrackerTask =
      clientExecutionTimer.startTimer(getClientExecutionTimeout(requestConfig));
  try {
    executionContext.setClientExecutionTrackerTask(clientExecutionTrackerTask);
    return doExecute();
  } finally {
    executionContext.getClientExecutionTrackerTask().cancelTask();
  }
}

相关文章