private synchronized void maybeComplete() { if (!coordinator.hasActiveSessions()) { StreamState finalState = getCurrentState(); if (finalState.hasFailedSession()) { logger.warn("[Stream #{}] Stream failed", planId); setException(new StreamException(finalState, "Stream failed")); } else { logger.info("[Stream #{}] All sessions completed", planId); set(finalState); } } } }
private synchronized void maybeComplete() { if (!coordinator.hasActiveSessions()) { StreamState finalState = getCurrentState(); if (finalState.hasFailedSession()) { logger.warn("[Stream #{}] Stream failed", planId); setException(new StreamException(finalState, "Stream failed")); } else { logger.info("[Stream #{}] All sessions completed", planId); set(finalState); } } } }
private synchronized void maybeComplete() { if (!coordinator.hasActiveSessions()) { StreamState finalState = getCurrentState(); if (finalState.hasFailedSession()) { logger.warn("[Stream #{}] Stream failed", planId); setException(new StreamException(finalState, "Stream failed")); } else { logger.info("[Stream #{}] All sessions completed", planId); set(finalState); } } } }
private synchronized void maybeComplete() { if (!coordinator.hasActiveSessions()) { StreamState finalState = getCurrentState(); if (finalState.hasFailedSession()) { logger.warn("[Stream #{}] Stream failed", planId); setException(new StreamException(finalState, "Stream failed")); } else { logger.info("[Stream #{}] All sessions completed", planId); set(finalState); } } } }