code: Action2<TaskRequest, String> getTaskAssignerIntl() throws IllegalStateException {
          return (request, hostname) -> {
              try (AutoCloseable ignored = stateMonitor.enter()) {
                  assignableVMs.setTaskAssigned(request, hostname);
              } catch (Exception e) {
                  logger.error("Unexpected error from state monitor: " + e.getMessage(), e);
                  throw new IllegalStateException(e);
              }
          };
      }
docs: /* package