public EPContextPartitionImportResult ImportStartPaths(String contextName, EPContextPartitionImportable importable, AgentInstanceSelector agentInstanceSelector) { ContextManager contextManager = CheckedGetContextManager(contextName); CPImportCallback importCallback = new CPImportCallback(); ContextControllerState state = new ContextControllerState(importable.Paths, true, importCallback); contextManager.ImportStartPaths(state, agentInstanceSelector); return(new EPContextPartitionImportResult(importCallback.ExistingToImported, importCallback.AllocatedToImported)); }
public EPContextPartitionImportResult ImportStartPaths(String contextName, EPContextPartitionImportable importable, AgentInstanceSelector agentInstanceSelector) { var contextManager = CheckedGetContextManager(contextName); var importCallback = new CPImportCallback(); var state = new ContextControllerState(importable.Paths, true, importCallback); contextManager.ImportStartPaths(state, agentInstanceSelector); ContextStateCache contextStateCache = contextManager.ContextStateCache; foreach (var entry in importable.Paths) { entry.Value.State = ContextPartitionState.STARTED; contextStateCache.UpdateContextPath(contextName, entry.Key, entry.Value); } return(new EPContextPartitionImportResult(importCallback.ExistingToImported, importCallback.AllocatedToImported)); }