private static string ResolveDeploymentId( string tableName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { string deploymentId; switch (visibility) { case NameAccessModifier.PRIVATE: deploymentId = services.DeploymentId; break; case NameAccessModifier.PUBLIC: case NameAccessModifier.INTERNAL: { deploymentId = services.NamedWindowPathRegistry.GetDeploymentId(tableName, optionalModuleName); if (deploymentId == null) { throw new EPException("Failed to resolve path named window '" + tableName + "'"); } break; } default: throw new ArgumentException("Unrecognized visibility " + visibility); } return deploymentId; }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { try { eventBeanFactory = EventTypeUtility.GetFactoryForType( EventType, services.EventBeanTypedEventFactory, services.EventTypeAvroHandler); var factoryContext = new VirtualDataWindowFactoryContext( EventType, Parameters, ParameterExpressions, NamedWindowName, CompileTimeConfiguration, viewFactoryContext, services); Factory.Initialize(factoryContext); } catch (Exception ex) { throw new EPException( "Validation exception initializing virtual data window '" + NamedWindowName + "': " + ex.Message, ex); } }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="expressionName">name</param> /// <param name="visibility">visibility</param> /// <param name="optionalModuleName">module name</param> /// <param name="services">services</param> /// <returns>deployment id</returns> public static string ResolveDeploymentId( string expressionName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { string deploymentId; if (visibility == NameAccessModifier.PRECONFIGURED) { deploymentId = null; } else if (visibility == NameAccessModifier.PRIVATE) { deploymentId = services.DeploymentId; } else if (visibility == NameAccessModifier.PUBLIC) { deploymentId = services.ExprDeclaredPathRegistry.GetDeploymentId(expressionName, optionalModuleName); if (deploymentId == null) { throw new EPException("Failed to resolve path expression '" + expressionName + "'"); } } else { throw new ArgumentException("Unrecognized visibility " + visibility); } return deploymentId; }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { foreach (ViewFactory factory in unioned) { factory.Init(viewFactoryContext, services); } }
public NamedWindowTailView CreateNamedWindowTailView( EventType eventType, bool isParentBatchWindow, EPStatementInitServices services, string contextNameWindow) { return new NamedWindowTailViewImpl(eventType, isParentBatchWindow, services); }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { if (eventType == null) { throw new IllegalStateException("Event type not provided"); } }
consumersNonContext; // handles as copy-on-write public NamedWindowTailViewImpl( EventType eventType, bool isParentBatchWindow, EPStatementInitServices services) : base(eventType, isParentBatchWindow, services) { this.consumersNonContext = NamedWindowUtil.CreateConsumerMap(isPrioritized); }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { Comparer = ExprNodeUtilityMake.GetComparatorHashableMultiKeys( SortCriteriaTypes, IsUseCollatorSort, IsDescendingValues); // hashable-key comparator since we may remove sort keys }
public ContainedEventEvalExprNode( ExprEvaluator evaluator, EventType eventType, EPStatementInitServices initServices) { this.evaluator = evaluator; this.eventBeanFactory = EventTypeUtility.GetFactoryForType( eventType, initServices.EventBeanTypedEventFactory, initServices.EventTypeAvroHandler); }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { if (Groupeds == null) { throw new IllegalStateException("Grouped views not provided"); } foreach (var grouped in Groupeds) { grouped.Init(viewFactoryContext, services); } }
public NamedWindowImpl( NamedWindowMetaData metadata, EPStatementInitServices services) { rootView = new NamedWindowRootView(metadata); eventTableIndexMetadataRepo = metadata.IndexMetadata; tailView = services.NamedWindowFactoryService.CreateNamedWindowTailView( metadata.EventType, metadata.IsChildBatching, services, metadata.ContextName); }
public void AddContext( ContextDefinition contextDefinition, EPStatementInitServices services) { var deployment = deployments.Get(services.DeploymentId); if (deployment == null) { deployment = new ContextDeployment(); deployments.Put(services.DeploymentId, deployment); } deployment.Add(contextDefinition, services); }
public void Add( string windowName, NamedWindowMetaData metadata, EPStatementInitServices services) { NamedWindow existing = namedWindows.Get(windowName); if (existing != null) { throw new IllegalStateException("Named window processor already found for name '" + windowName + "'"); } NamedWindow namedWindow = services.NamedWindowFactoryService.CreateNamedWindow(metadata, services); namedWindows.Put(windowName, namedWindow); }
public void Add( ContextDefinition contextDefinition, EPStatementInitServices services) { var contextName = contextDefinition.ContextName; var mgr = contexts.Get(contextName); if (mgr != null) { throw new EPException("Context by name '" + contextDefinition.ContextName + "' already exists"); } var contextManager = new ContextManagerResident(services.DeploymentId, contextDefinition); contexts.Put(contextName, contextManager); }
public void Add( string tableName, TableMetaData metadata, EPStatementInitServices services) { Table existing = tables.Get(tableName); if (existing != null) { throw new IllegalStateException("Table already found for name '" + tableName + "'"); } Table table = services.TableManagementService.AllocateTable(metadata); tables.Put(tableName, table); }
public void AddTable( string tableName, TableMetaData tableMetaData, EPStatementInitServices services) { var deployment = deployments.Get(services.DeploymentId); if (deployment == null) { deployment = new TableDeployment(); deployments.Put(services.DeploymentId, deployment); } deployment.Add(tableName, tableMetaData, services); }
public void AddNamedWindow( string windowName, NamedWindowMetaData metadata, EPStatementInitServices services) { NamedWindowDeployment deployment = deployments.Get(services.DeploymentId); if (deployment == null) { deployment = new NamedWindowDeployment(); deployments.Put(services.DeploymentId, deployment); } deployment.Add(windowName, metadata, services); }
public NamedWindowTailViewBase( EventType eventType, bool isParentBatchWindow, EPStatementInitServices services) { this.eventType = eventType; namedWindowManagementService = services.NamedWindowManagementService; namedWindowDispatchService = services.NamedWindowDispatchService; statementResultService = services.StatementResultService; isPrioritized = services.RuntimeSettingsService.ConfigurationRuntime.Execution.IsPrioritized; this.isParentBatchWindow = isParentBatchWindow; threadingConfig = services.RuntimeSettingsService.ConfigurationRuntime.Threading; timeSourceService = services.TimeSourceService; }
public static Table ResolveTable( string tableName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { string deploymentId = ResolveDeploymentId(tableName, visibility, optionalModuleName, services); Table table = services.TableManagementService.GetTable(deploymentId, tableName); if (table == null) { throw new EPException("Failed to resolve table '" + tableName + "'"); } return table; }
public static Variable ResolveVariable( string variableName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { var deploymentId = ResolveDeploymentId(variableName, visibility, optionalModuleName, services); var variable = services.VariableManagementService.GetVariableMetaData(deploymentId, variableName); if (variable == null) { throw new EPException("Failed to resolve variable '" + variableName + "'"); } return variable; }
public static NamedWindow ResolveNamedWindow( string namedWindowName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { string deploymentId = ResolveDeploymentId(namedWindowName, visibility, optionalModuleName, services); NamedWindow namedWindow = services.NamedWindowManagementService.GetNamedWindow(deploymentId, namedWindowName); if (namedWindow == null) { throw new EPException("Failed to resolve named window '" + namedWindowName + "'"); } return namedWindow; }
/// <summary> /// Ctor. /// </summary> /// <param name="eventType">event type</param> /// <param name="parameters">parameter values</param> /// <param name="parameterExpressions">parameter expressions</param> /// <param name="namedWindowName">named window name</param> /// <param name="customConfiguration">custom configuration object that is passed along</param> /// <param name="viewFactoryContext">view context</param> /// <param name="services">services</param> public VirtualDataWindowFactoryContext( EventType eventType, object[] parameters, ExprEvaluator[] parameterExpressions, string namedWindowName, object customConfiguration, ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { EventType = eventType; Parameters = parameters; ParameterExpressions = parameterExpressions; NamedWindowName = namedWindowName; CustomConfiguration = customConfiguration; ViewFactoryContext = viewFactoryContext; Services = services; }
public static IDictionary<int, VariableReader> ResolveVariableReaderPerCP( string variableName, NameAccessModifier visibility, string optionalModuleName, string optionalContextName, EPStatementInitServices services) { if (optionalContextName == null) { throw new ArgumentException("No context name"); } var deploymentId = ResolveDeploymentId(variableName, visibility, optionalModuleName, services); IDictionary<int, VariableReader> reader = services.VariableManagementService.GetReadersPerCP(deploymentId, variableName); if (reader == null) { throw new EPException("Failed to resolve variable '" + variableName + "'"); } return reader; }
private static string ResolveDeploymentId( string tableName, NameAccessModifier visibility, string optionalModuleName, EPStatementInitServices services) { string deploymentId; if (visibility == NameAccessModifier.PRIVATE) { deploymentId = services.DeploymentId; } else if (visibility == NameAccessModifier.PUBLIC || visibility == NameAccessModifier.INTERNAL) { deploymentId = services.TablePathRegistry.GetDeploymentId(tableName, optionalModuleName); if (deploymentId == null) { throw new EPException("Failed to resolve path table '" + tableName + "'"); } } else { throw new ArgumentException("Unrecognized visibility " + visibility); } return deploymentId; }
public static VariableReader ResolveVariableReader( string variableName, NameAccessModifier visibility, string optionalModuleName, string optionalContextName, EPStatementInitServices services) { if (optionalContextName != null) { throw new ArgumentException("Expected null context name"); } var deploymentId = ResolveDeploymentId(variableName, visibility, optionalModuleName, services); var reader = services.VariableManagementService.GetReader( deploymentId, variableName, DEFAULT_AGENT_INSTANCE_ID); if (reader == null) { throw new EPException("Failed to resolve variable '" + variableName + "'"); } return reader; }
public void Init( ViewFactoryContext viewFactoryContext, EPStatementInitServices services) { }
public NamedWindow CreateNamedWindow( NamedWindowMetaData metadata, EPStatementInitServices services) { return new NamedWindowImpl(metadata, services); }