Beispiel #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="DatabaseMemoizationStore"/> class.
        /// </summary>
        public DatabaseMemoizationStore(MemoizationDatabase database)
        {
            Contract.RequiresNotNull(database);

            _tracer  = new MemoizationStoreTracer(database.Name);
            Database = database;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="DatabaseMemoizationStore"/> class.
        /// </summary>
        public DatabaseMemoizationStore(ILogger logger, MemoizationDatabase database)
        {
            Contract.Requires(logger != null);
            Contract.Requires(database != null);

            _tracer   = new MemoizationStoreTracer(logger, database.Name);
            _database = database;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildCacheCacheTracer"/> class.
        /// </summary>
        public BuildCacheCacheTracer(ILogger logger, string name)
            : base(name)
        {
            ContentSessionTracer   = new BackingContentStoreTracer(name);
            MemoizationStoreTracer = new MemoizationStoreTracer(logger, name);

            _counters.Add(_prefetchedContentHashListCounter     = new Counter(PrefetchedContentHashListCountName));
            _counters.Add(_prefetchedContentHashListUsedCounter = new Counter(PrefetchedContentHashListUsedCountName));
        }
Beispiel #4
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="RocksDbMemoizationStore"/> class.
        /// </summary>
        public RocksDbMemoizationStore(ILogger logger, IClock clock, RocksDbMemoizationStoreConfiguration config)
        {
            Contract.Requires(logger != null);
            Contract.Requires(config != null);
            Contract.Requires(clock != null);

            _tracer   = new MemoizationStoreTracer(logger, Component);
            _clock    = clock;
            _database = new RocksDbContentLocationDatabase(clock, config.Database, () => new MachineId[] { });
        }
Beispiel #5
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="DatabaseMemoizationStore"/> class.
        /// </summary>
        protected DatabaseMemoizationStore(ILogger logger, string name)
        {
            Contract.RequiresNotNull(logger);

            _tracer = new MemoizationStoreTracer(name);
        }
Beispiel #6
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="MemoryMemoizationStore"/> class.
        /// </summary>
        public MemoryMemoizationStore(ILogger logger)
        {
            Contract.Requires(logger != null);

            _tracer = new MemoizationStoreTracer(logger, nameof(MemoryMemoizationStore));
        }