예제 #1
0
        public List <Event> GetFilteredEventsList(string clientID, Hashtable events, EventStatus registeredEventStatus)
        {
            IEnumerator  en = _index.GetCurrentData();
            Event        evt;
            List <Event> filteredEvents = new List <Event>();

            while (en.MoveNext())
            {
                evt = (Event)en.Current;
                if (!events.Contains(evt.PersistedEventId))
                {
                    switch (evt.PersistedEventId.EventType)
                    {
                    case EventType.CACHE_CLEARED_EVENT:
                        if (registeredEventStatus.IsCacheClearedEvent)
                        {
                            filteredEvents.Add(evt);
                        }
                        break;

                    case EventType.ITEM_REMOVED_EVENT:
                        if (registeredEventStatus.IsItemRemovedEvent)
                        {
                            filteredEvents.Add(evt);
                        }
                        break;

                    case EventType.ITEM_ADDED_EVENT:
                        if (registeredEventStatus.IsItemAddedEvent)
                        {
                            filteredEvents.Add(evt);
                        }
                        break;

                    case EventType.ITEM_UPDATED_EVENT:
                        if (registeredEventStatus.IsItemUpdatedEvent)
                        {
                            filteredEvents.Add(evt);
                        }
                        break;

                    case EventType.ITEM_REMOVED_CALLBACK:
                    case EventType.ITEM_UPDATED_CALLBACK:
                        foreach (CallbackInfo cbInfo in evt.PersistedEventInfo.CallBackInfoList)
                        {
                            if (cbInfo != null && cbInfo.Client != null && cbInfo.Client.Equals(clientID))
                            {
                                if (!filteredEvents.Contains(evt))
                                {
                                    filteredEvents.Add(evt);
                                }
                            }
                        }
                        break;
                    }
                }
            }

            return(filteredEvents);
        }
예제 #2
0
        public List <EventId> GetPersistedEventsList()
        {
            IEnumerator    en = _index.GetCurrentData();
            EventId        evtId;
            List <EventId> events = new List <EventId>();

            while (en.MoveNext())
            {
                evtId = (EventId)en.Current;
                events.Add(evtId);
            }

            return(events);
        }
예제 #3
0
        public List <Alachisoft.NCache.Common.Monitoring.APILogging.APIRuntimeLogItem> GetEntry(ref long startTime)
        {
            List <Alachisoft.NCache.Common.Monitoring.APILogging.APIRuntimeLogItem> sbEntries = new List <Alachisoft.NCache.Common.Monitoring.APILogging.APIRuntimeLogItem>();

            try
            {
                IEnumerator en = _index.GetCurrentData(ref startTime);
                while (en.MoveNext())
                {
                    sbEntries.Add((Alachisoft.NCache.Common.Monitoring.APILogging.APIRuntimeLogItem)en.Current);
                }
                return(sbEntries);
            }
            catch
            {
                return(null);
            }
        }