void (@NotNull Task<?, ?> task, int attempt, int delay) { try { count.incrementAndGet(); offer(() -> invokeSafely(task, attempt), delay); } catch (RejectedExecutionException exception) { count.decrementAndGet(); if (LOG.isTraceEnabled()) LOG.debug("Executor is shutdown"); task.promise.setError("shutdown"); } }