Пример #1
0
        public void Prefetch(PrefetchPolicy prefetchPolicy, IEnumerable <long> objectIds)
        {
            var references = this.Prefetcher.GetReferencesForPrefetching(objectIds);

            if (references.Count != 0)
            {
                this.Flush();

                var prefetcher = new Prefetch(this.Prefetcher, prefetchPolicy, references);
                prefetcher.Execute();
            }
        }
Пример #2
0
        public void Prefetch(PrefetchPolicy prefetchPolicy, params long[] objectIds)
        {
            var references = this.Prefetcher.GetReferencesForPrefetching(new HashSet <long>(objectIds));

            if (references.Count != 0)
            {
                this.Flush();

                var prefetcher = new Prefetch(this.Prefetcher, prefetchPolicy, references);
                prefetcher.Execute();
            }
        }
Пример #3
0
        public void Prefetch(PrefetchPolicy prefetchPolicy, params string[] objectIdStrings)
        {
            var objectIds  = new HashSet <long>(objectIdStrings.Select(v => long.Parse(v)));
            var references = this.Prefetcher.GetReferencesForPrefetching(objectIds);

            if (references.Count != 0)
            {
                this.Flush();

                var prefetcher = new Prefetch(this.Prefetcher, prefetchPolicy, references);
                prefetcher.Execute();
            }
        }
Пример #4
0
        public void Prefetch(PrefetchPolicy prefetchPolicy, params IStrategy[] strategies)
        {
            var objectIds  = new HashSet <long>(strategies.Select(x => x.ObjectId));
            var references = this.Prefetcher.GetReferencesForPrefetching(objectIds);

            if (references.Count != 0)
            {
                this.Flush();

                var prefetcher = new Prefetch(this.Prefetcher, prefetchPolicy, references);
                prefetcher.Execute();
            }
        }