/** * Event handler for the list of active containers on restart. * Sets the info key {@link StatusKeys#INFO_CONTAINERS_AM_RESTART} * to the size of the list passed down (and does not set it if none were) * @param liveContainers the containers allocated * @return true if a rebuild took place (even if size 0) * @throws RuntimeException on problems */ private boolean rebuildModelFromRestart(List<Container> liveContainers) throws BadClusterStateException { if (liveContainers == null) { return false; } for (Container container : liveContainers) { addRestartedContainer(container); } clusterStatus.setInfo(StatusKeys.INFO_CONTAINERS_AM_RESTART, Integer.toString(liveContainers.size())); return true; }
/** * Event handler for the list of active containers on restart. * Sets the info key {@link StatusKeys#INFO_CONTAINERS_AM_RESTART} * to the size of the list passed down (and does not set it if none were) * @param liveContainers the containers allocated * @return true if a rebuild took place (even if size 0) * @throws RuntimeException on problems */ private boolean rebuildModelFromRestart(List<Container> liveContainers) throws BadClusterStateException { if (liveContainers == null) { return false; } for (Container container : liveContainers) { addRestartedContainer(container); } clusterStatus.setInfo(StatusKeys.INFO_CONTAINERS_AM_RESTART, Integer.toString(liveContainers.size())); return true; }