public ContextManager GetContextManager(String contextName) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { return(null); } return(entry.ContextManager); }
public void AddStatement(String contextName, ContextControllerStatementBase statement, bool isRecoveringResilient) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { throw new ExprValidationException(GetNotDecaredText(contextName)); } entry.AddStatement(statement.StatementContext.StatementId); entry.ContextManager.AddStatement(statement, isRecoveringResilient); }
public void StoppedStatement(String contextName, String statementName, String statementId) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { Log.Warn("Stop statement for statement '" + statementName + "' failed to locate corresponding context manager '" + contextName + "'"); return; } try { entry.ContextManager.StopStatement(statementName, statementId); } catch (Exception ex) { Log.Warn("Failed to stop statement '" + statementName + "' as related to context '" + contextName + "': " + ex.Message, ex); } }
public void DestroyedStatement(String contextName, String statementName, String statementId) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { Log.Warn("Dispose statement for statement '" + statementName + "' failed to locate corresponding context manager '" + contextName + "'"); return; } entry.RemoveStatement(statementId); entry.ContextManager.DestroyStatement(statementName, statementId); if (entry.StatementCount == 0 && _destroyedContexts.Contains(contextName)) { DestroyContext(contextName, entry); } }
public void StoppedStatement(String contextName, String statementName, int statementId, String epl, ExceptionHandlingService exceptionHandlingService) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { Log.Warn("Stop statement for statement '" + statementName + "' failed to locate corresponding context manager '" + contextName + "'"); return; } try { entry.ContextManager.StopStatement(statementName, statementId); } catch (Exception ex) { exceptionHandlingService.HandleException(ex, statementName, epl, ExceptionHandlerExceptionType.STOP); } }
public void DestroyedContext(String contextName) { ContextManagerEntry entry = _contexts.Get(contextName); if (entry == null) { Log.Warn("Dispose for context '" + contextName + "' failed to locate corresponding context manager '" + contextName + "'"); return; } if (entry.StatementCount == 0) { DestroyContext(contextName, entry); } else { // some remaining statements have references _destroyedContexts.Add(contextName); } }
private void DestroyContext(String contextName, ContextManagerEntry entry) { entry.ContextManager.SafeDestroy(); _contexts.Remove(contextName); _destroyedContexts.Remove(contextName); }
public ContextManager GetContextManager(String contextName) { ContextManagerEntry entry = _contexts.Get(contextName); return(entry == null ? null : entry.ContextManager); }