Example #1
0
        public CacheHintMaker
            (LogFileStatsCache statsCache, ILogQuery query, LogAccumulator accumulator)
        {
            Debug.Assert(statsCache != null, "PrecacheScheduler.ctor: statsCache is null.");
            Debug.Assert(query != null, "PrecacheScheduler.ctor: query is null.");
            Debug.Assert(accumulator != null, "PrecacheScheduler.ctor: accumulator is null.");

            statsCache_  = statsCache;
            filter_      = query.CreateFilter();
            accumulator_ = accumulator;
        }
Example #2
0
        public CacheHintMaker Consume(ILogFile logFile)
        {
            if (accumulator_.IsComplete)
            {
                statsCache_.Hint(logFile, filter_);
            }
            else
            {
                accumulator_ = accumulator_.Consume(logFile);
            }

            return(this);
        }