コード例 #1
0
 @Override
 public HttpClientRequest setTimeout(long timeoutMs) {
   synchronized (getLock()) {
     cancelOutstandingTimeoutTimer();
     currentTimeoutTimerId = client.getVertx().setTimer(timeoutMs, id -> handleTimeout(timeoutMs));
     return this;
   }
 }
コード例 #2
0
 private void cancelOutstandingTimeoutTimer() {
   if (currentTimeoutTimerId != -1) {
     client.getVertx().cancelTimer(currentTimeoutTimerId);
     currentTimeoutTimerId = -1;
   }
 }