Beispiel #1
0
        public override void StopBucketFilteration(IList <Int32> buckets, FilterType type)
        {
            lock (_filterMutex)
            {
                switch (type)
                {
                case FilterType.BucketFilter:
                {
                    _bucketFilter = null;
                }
                break;

                case FilterType.CompoundFilter:
                {
                    if (_compoundFilter != null && buckets != null)
                    {
                        foreach (var b in buckets)
                        {
                            _compoundFilter.RemoveBucket(b);
                        }

                        if (_compoundFilter.IsEmpty)
                        {
                            _compoundFilter = null;
                        }
                    }
                }
                break;
                }
            }
        }
Beispiel #2
0
        public override void StartBucketFilteration(int bucketID, FilterType type)
        {
            lock (_filterMutex)
            {
                switch (type)
                {
                case FilterType.BucketFilter:

                    _bucketFilter = new BucketBasedKeyFilter(bucketID);
                    break;

                case FilterType.CompoundFilter:
                {
                    if (_compoundFilter == null)
                    {
                        _compoundFilter = new CompoundKeyFilter();
                    }
                    _compoundFilter.FilterBucket(bucketID);
                }
                break;
                }
            }
        }