private void handlePause() { if (outstandingCount == 0) { state = State.SUSPENDED; if (timer != null) { timer.cancel(); timer = null; } for(OperationListener listener: new ArrayList<>(operationListeners)) { listener.complete(); } } }
private void handlePause() { if (outstandingCount == 0) { state = State.SUSPENDED; if (timer != null) { timer.cancel(); timer = null; } for(OperationListener listener: new ArrayList<>(operationListeners)) { listener.complete(); } } }