fenzo-core/src/main/java/com/netflix/fenzo/TaskScheduler.java
SchedulingResult scheduleOnce(
            TaskIterator taskIterator,
            List<VirtualMachineLease> newLeases) throws IllegalStateException {
        checkIfShutdown();
        try (AutoCloseable ignored = stateMonitor.enter()) {
            return doScheduling(taskIterator, newLeases);
        } catch (Exception e) {
            logger.error("Error with scheduling run: " + e.getMessage(), e);
            if (e instanceof IllegalStateException) {
                throw (IllegalStateException) e;
            } else {
                logger.warn("Unexpected exception: " + e.getMessage());
                throw new IllegalStateException("Unexpected exception during scheduling run: " + e.getMessage(), e);
            }
        }
    }
SchedulingResult scheduleOnce(
            TaskIterator taskIterator,
            List<VirtualMachineLease> newLeases) throws IllegalStateException {
        checkIfShutdown();
        try (AutoCloseable ignored = stateMonitor.enter()) {
            return doScheduling(taskIterator, newLeases);
        } catch (Exception e) {
            logger.error("Error with scheduling run: " + e.getMessage(), e);
            if (e instanceof IllegalStateException) {
                throw (IllegalStateException) e;
            } else {
                logger.warn("Unexpected exception: " + e.getMessage());
                throw new IllegalStateException("Unexpected exception during scheduling run: " + e.getMessage(), e);
            }
        }
    }
/* package