コード例 #1
0
ファイル: FilterServiceBase.cs プロジェクト: lanicon/nesper
 protected FilterServiceBase(
     FilterServiceGranularLockFactory lockFactory,
     int stageId)
 {
     this.lockFactory = lockFactory;
     this.stageId = stageId;
     eventTypeIndex = new EventTypeIndex(lockFactory);
     indexBuilder = new EventTypeIndexBuilder(eventTypeIndex);
     filterServiceListeners = new CopyOnWriteArraySet<FilterServiceListener>();
 }
コード例 #2
0
ファイル: TestEventTypeIndex.cs プロジェクト: lanicon/nesper
        public void SetUp()
        {
            SupportBean testBean = new SupportBean();

            testEventBean = SupportEventBeanFactory
                            .GetInstance(container)
                            .CreateObject(testBean);
            testEventType = testEventBean.EventType;

            handleSetNode  = new FilterHandleSetNode(new SlimReaderWriterLock());
            filterCallback = new SupportFilterHandle();
            handleSetNode.Add(filterCallback);

            testIndex = new EventTypeIndex(new FilterServiceGranularLockFactoryReentrant(
                                               container.RWLockManager()));
            testIndex.Add(testEventType, handleSetNode);
        }
コード例 #3
0
        public void SetUp()
        {
            var supportEventTypeFactory = SupportEventTypeFactory.GetInstance(container);

            lockFactory = new FilterServiceGranularLockFactoryReentrant(
                container.RWLockManager());

            eventTypeIndex = new EventTypeIndex(lockFactory);
            indexBuilder   = new EventTypeIndexBuilder(eventTypeIndex);

            typeOne = supportEventTypeFactory.CreateBeanType(typeof(SupportBean));
            typeTwo = supportEventTypeFactory.CreateBeanType(typeof(SupportBeanSimple));

            valueSetOne = SupportFilterSpecBuilder.Build(typeOne, new object[0]).GetValueSet(null, null, null, null);
            valueSetTwo = SupportFilterSpecBuilder.Build(typeTwo, new object[0]).GetValueSet(null, null, null, null);

            callbackOne = new SupportFilterHandle();
            callbackTwo = new SupportFilterHandle();
        }
コード例 #4
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)
 {
     this.eventTypeIndex = eventTypeIndex;
     callbacksLock = new MonitorSlimLock(LockConstants.DefaultTimeout);
 }