Set<String> aliveIds = new HashSet<>();
ImmutableMap<String, Installation> map = manager.listInstallationMap();
ImmutableSet<Map.Entry<String, Installation>> entries = map.entrySet();
for (Map.Entry<String, Installation> entry : entries) {
String id = entry.getKey();
Installation installation = entry.getValue();
try {
Container container = null;
try {
container = fabric.getContainer(id);
} catch (Exception e) {
LOG.debug("No container for id: " + id + ". " + e, e);
}
if (container != null) {
Long pid = installation.getActivePid();
if (LOG.isDebugEnabled()) {
LOG.debug("Polling container " + id + " for its PID");
}
if (pid == null) {
if (container.isAlive()) {