Ejemplo n.º 1
0
 public SupportMTUpdateListener()
 {
     _id          = string.Empty;
     _oLock       = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _newDataList = new List <EventBean[]>();
     _oldDataList = new List <EventBean[]>();
 }
Ejemplo n.º 2
0
 /// <summary>Ctor. </summary>
 /// <param name="knownTypes">types known at cache construction type, may be an empty list for the ANY type variance.</param>
 public VariantPropertyGetterCache(EventType[] knownTypes)
 {
     _iLock      = LockManager.CreateLock(GetType());
     _knownTypes = knownTypes;
     _allGetters = new Dictionary <EventType, VariantPropertyGetterRow>();
     _properties = new List <String>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="timeSourceService">time source provider</param>
 public SchedulingServiceImpl(TimeSourceService timeSourceService)
 {
     _uLock         = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _timeHandleMap = new SortedList <long, IDictionary <ScheduleSlot, ScheduleHandle> >();
     _handleSetMap  = new Dictionary <ScheduleHandle, IDictionary <ScheduleSlot, ScheduleHandle> >();
     // initialize time to just before now as there is a check for duplicate external time events
     _currentTime = timeSourceService.GetTimeMillis() - 1;
 }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="eventAdapterService">for dynamic event type creation</param>
 /// <param name="metadata">event type metadata</param>
 /// <param name="eventTypeId">The event type id.</param>
 /// <param name="underlyngType">is the underlying type returned by the event type</param>
 protected BaseConfigurableEventType(EventAdapterService eventAdapterService, EventTypeMetadata metadata, int eventTypeId, Type underlyngType)
 {
     _iLock               = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _eventTypeId         = eventTypeId;
     _eventAdapterService = eventAdapterService;
     _metadata            = metadata;
     _underlyngType       = underlyngType;
 }
Ejemplo n.º 5
0
 /// <summary>Ctor. </summary>
 /// <param name="runtime">for processing events</param>
 /// <param name="beanEventType">the event type</param>
 /// <param name="eventAdapterService">factory for event beans and event types</param>
 /// <param name="threadingService">for inbound threading</param>
 public EventSenderBean(EPRuntimeEventSender runtime, BeanEventType beanEventType, EventAdapterService eventAdapterService, ThreadingService threadingService)
 {
     _iLock               = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _runtime             = runtime;
     _beanEventType       = beanEventType;
     _eventAdapterService = eventAdapterService;
     _compatibleClasses   = new HashSet <Type>();
     _threadingService    = threadingService;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="typesPerObject">shareable collection that this adapter writes tofor caching bean types per class</param>
 /// <param name="eventAdapterService">factory for event beans and event types</param>
 /// <param name="eventTypeIdGenerator">The event type id generator.</param>
 public BeanEventAdapter(IDictionary <Type, BeanEventType> typesPerObject,
                         EventAdapterService eventAdapterService,
                         EventTypeIdGenerator eventTypeIdGenerator)
 {
     _typesPerObject                 = typesPerObject;
     _typesPerObjectLock             = LockManager.CreateLock(GetType());
     _typeToLegacyConfigs            = new Dictionary <String, ConfigurationEventTypeLegacy>();
     _defaultPropertyResolutionStyle = PropertyResolutionStyle.DEFAULT;
     _eventAdapterService            = eventAdapterService;
     _eventTypeIdGenerator           = eventTypeIdGenerator;
 }
 public ExprTimePeriodEvalDeltaConstGivenDtxAdd(
     ExprTimePeriodImpl.TimePeriodAdder[] adders,
     int[] added,
     TimeZoneInfo timeZone,
     TimeAbacus timeAbacus)
 {
     _iLock             = LockManager.CreateLock(MethodBase.GetCurrentMethod().DeclaringType);
     _adders            = adders;
     _added             = added;
     _dateTime          = new DateTimeEx(DateTimeOffset.Now, timeZone);
     _timeAbacus        = timeAbacus;
     _indexMicroseconds = ExprTimePeriodUtil.FindIndexMicroseconds(adders);
 }
Ejemplo n.º 8
0
        public ContextManagerImpl(ContextControllerFactoryServiceContext factoryServiceContext)
        {
            _uLock                     = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            _contextName               = factoryServiceContext.ContextName;
            _servicesContext           = factoryServiceContext.ServicesContext;
            _factory                   = factoryServiceContext.AgentInstanceContextCreate.StatementContext.ContextControllerFactoryService.GetFactory(factoryServiceContext)[0];
            _rootContext               = _factory.CreateNoCallback(0, this); // single instance: created here and activated/deactivated later
            _contextPartitionIdManager = factoryServiceContext.AgentInstanceContextCreate.StatementContext.ContextControllerFactoryService.AllocatePartitionIdMgr(_contextName, factoryServiceContext.AgentInstanceContextCreate.StatementContext.StatementId);

            var resourceRegistryFactory = _factory.StatementAIResourceRegistryFactory;

            var contextProps     = _factory.ContextBuiltinProps;
            var contextPropsType = _servicesContext.EventAdapterService.CreateAnonymousMapType(_contextName, contextProps, true);
            var registry         = new ContextPropertyRegistryImpl(_factory.ContextDetailPartitionItems, contextPropsType);

            _contextDescriptor = new ContextDescriptor(_contextName, _factory.IsSingleInstanceContext, registry, resourceRegistryFactory, this, _factory.ContextDetail);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="namedWindowName">Name of the named window.</param>
        /// <param name="namedWindowService">service for dispatching results</param>
        /// <param name="contextName">Name of the context.</param>
        /// <param name="singleInstanceContext">if set to <c>true</c> [single instance context].</param>
        /// <param name="eventType">the type of event held by the named window</param>
        /// <param name="statementResultService">for coordinating on whether insert and remove stream events should be posted</param>
        /// <param name="revisionProcessor">for revision processing</param>
        /// <param name="eplExpression">epl expression</param>
        /// <param name="statementName">statement name</param>
        /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
        /// <param name="isEnableSubqueryIndexShare">if set to <c>true</c> [is enable subquery index share].</param>
        /// <param name="enableQueryPlanLog">if set to <c>true</c> [enable query plan log].</param>
        /// <param name="metricReportingService">The metric reporting service.</param>
        /// <param name="isBatchingDataWindow">if set to <c>true</c> [is batching data window].</param>
        /// <param name="isVirtualDataWindow">if set to <c>true</c> [is virtual data window].</param>
        /// <param name="statementMetricHandle">The statement metric handle.</param>
        /// <param name="optionalUniqueKeyProps">The optional unique key props.</param>
        /// <param name="eventTypeAsName">Name of the event type as.</param>
        public NamedWindowProcessor(
            string namedWindowName,
            NamedWindowService namedWindowService,
            string contextName,
            EventType eventType,
            StatementResultService statementResultService,
            ValueAddEventProcessor revisionProcessor,
            string eplExpression,
            string statementName,
            bool isPrioritized,
            bool isEnableSubqueryIndexShare,
            bool enableQueryPlanLog,
            MetricReportingService metricReportingService,
            bool isBatchingDataWindow,
            bool isVirtualDataWindow,
            StatementMetricHandle statementMetricHandle,
            ICollection <string> optionalUniqueKeyProps,
            string eventTypeAsName,
            StatementResourceService statementResourceService)
        {
            _namedWindowName            = namedWindowName;
            _contextName                = contextName;
            _eventType                  = eventType;
            _eplExpression              = eplExpression;
            _statementName              = statementName;
            _isEnableSubqueryIndexShare = isEnableSubqueryIndexShare;
            _isVirtualDataWindow        = isVirtualDataWindow;
            _statementMetricHandle      = statementMetricHandle;
            _optionalUniqueKeyProps     = optionalUniqueKeyProps;
            _eventTypeAsName            = eventTypeAsName;
            _statementResourceService   = statementResourceService;
            _lock = LockManager.CreateLock(GetType());

            _rootView = new NamedWindowRootView(revisionProcessor, enableQueryPlanLog, metricReportingService, eventType, isBatchingDataWindow, isEnableSubqueryIndexShare, optionalUniqueKeyProps);
            _tailView = new NamedWindowTailView(eventType, namedWindowService, statementResultService, revisionProcessor, isPrioritized, isBatchingDataWindow);
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="eventAdapterService">factory for event beans and event types</param>
 protected DynamicPropertyGetterBase(EventAdapterService eventAdapterService)
 {
     this._iLock = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     this._cache = new CopyOnWriteList <DynamicPropertyDescriptor>();
     this._eventAdapterService = eventAdapterService;
 }
Ejemplo n.º 11
0
 static EPServiceProviderManager()
 {
     LockObj  = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     Runtimes = new ConcurrentDictionary <string, EPServiceProviderSPI>();
 }
Ejemplo n.º 12
0
 /// <summary>Ctor. </summary>
 /// <param name="classIdentifiers">is a list of type names to check type for</param>
 public ExprInstanceofNode(String[] classIdentifiers)
 {
     _oLock            = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _classIdentifiers = classIdentifiers;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructor - takes the event type index to manipulate as its parameter.
 /// </summary>
 /// <param name="eventTypeIndex">index to manipulate</param>
 public EventTypeIndexBuilder(EventTypeIndex eventTypeIndex, bool allowIsolation)
 {
     _eventTypeIndex      = eventTypeIndex;
     _callbacksLock       = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     _isolatableCallbacks = allowIsolation ? new Dictionary <FilterHandle, EventTypeIndexBuilderValueIndexesPair>() : null;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleServiceDirectory"/> class.
 /// </summary>
 public SimpleServiceDirectory()
 {
     m_dataTable = new Dictionary <string, object>();
     m_dataLock  = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CopyOnWriteList&lt;T&gt;"/> class.
 /// </summary>
 public CopyOnWriteList()
 {
     _arrayList  = new T[0];
     _writerLock = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 }
Ejemplo n.º 16
0
        public void SetUp()
        {
            var rLock = LockManager.CreateLock(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            list = new VersionedValueList <String>("abc", 2, "a", 1000, 10000, rLock, 10, true);
        }