private void DispatchOnUndeploymentEvent( DeploymentInternal result, int rolloutItemNumber) { var listeners = _services.DeploymentLifecycleService.Listeners; if (listeners.IsEmpty()) { return; } var statements = result.Statements; var @event = new DeploymentStateEventUndeployed( _services.RuntimeURI, result.DeploymentId, result.ModuleProvider.ModuleName, statements, rolloutItemNumber); foreach (DeploymentStateListener listener in listeners) { try { listener.OnUndeployment(@event); } catch (Exception ex) { HandleDeploymentEventListenerException("on-undeployment", ex); } } }
public void OnUndeployment(DeploymentStateEventUndeployed @event) { foreach (var stmt in @event.Statements) { if (listeners.TryRemove(stmt, out var listener)) { stmt.RemoveListener(listener); } } }
public void OnUndeployment(DeploymentStateEventUndeployed @event) { if (!specification.IsEnableMetricsReporting) { return; } foreach (EPStatement stmt in @event.Statements) { var pair = new DeploymentIdNamePair(stmt.DeploymentId, stmt.Name); stmtMetricRepository.RemoveStatement(pair); statementMetricHandles.Remove(pair); } }
public void OnUndeployment(DeploymentStateEventUndeployed @event) { Events.Add(@event); }