Example #1
0
        public DocumentCacher(InMemoryRavenConfiguration configuration)
        {
            this.configuration        = configuration;
            cachedSerializedDocuments = CreateCache();

            MemoryStatistics.RegisterLowMemoryHandler(this);
        }
Example #2
0
 public PrefetchingBehavior(PrefetchingUser prefetchingUser, WorkContext context, BaseBatchSizeAutoTuner autoTuner)
 {
     this.context    = context;
     this.autoTuner  = autoTuner;
     PrefetchingUser = prefetchingUser;
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Example #3
0
 public IndexSearcherHoldingState(IndexSearcher indexSearcher, string publicName, string databaseName)
 {
     IndexSearcher     = indexSearcher;
     this.databaseName = databaseName;
     indexName         = publicName;
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
 protected BaseBatchSizeAutoTuner(WorkContext context)
 {
     this.context = context;
     NumberOfItemsToIndexInSingleBatch = InitialNumberOfItems;
     MemoryStatistics.RegisterLowMemoryHandler(this);
     _currentlyUsedBatchSizesInBytes = new ConcurrentDictionary <Guid, long>();
     memoryLimitForIndexingInBytes   = context.Configuration.MemoryLimitForIndexingInMB * 1024 * 1024;
 }
Example #5
0
        protected BaseBatchSizeAutoTuner(WorkContext context)
        {
            this.context = context;
            FetchingDocumentsFromDiskTimeout         = TimeSpan.FromSeconds(context.Configuration.Prefetcher.FetchingDocumentsFromDiskTimeoutInSeconds);
            maximumSizeAllowedToFetchFromStorageInMb = context.Configuration.Prefetcher.MaximumSizeAllowedToFetchFromStorageInMb;
// ReSharper disable once DoNotCallOverridableMethodsInConstructor
            NumberOfItemsToProcessInSingleBatch = InitialNumberOfItems;
            MemoryStatistics.RegisterLowMemoryHandler(this);
            context.TransactionalStorage.RegisterTransactionalStorageNotificationHandler(this);
            _currentlyUsedBatchSizesInBytes = new ConcurrentDictionary <Guid, long>();
        }
Example #6
0
 public CachedIndexedTerms()
 {
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Example #7
0
 static WebSocketTransportFactory()
 {
     MemoryStatistics.RegisterLowMemoryHandler(DisconnectWebSockets.Instance);
 }
Example #8
0
            public IndexSearcherHoldingState(IndexSearcher indexSearcher)
            {
                IndexSearcher = indexSearcher;

                MemoryStatistics.RegisterLowMemoryHandler(this);
            }
Example #9
0
 public Prefetcher(WorkContext workContext)
 {
     this.workContext = workContext;
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Example #10
0
 public WeakCache()
 {
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Example #11
0
 public CachedIndexedTerms(string databaseName, string indexName)
 {
     this.databaseName = databaseName;
     this.indexName    = indexName;
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Example #12
0
 static DocumentIdSet()
 {
     MemoryStatistics.RegisterLowMemoryHandler(documentIdSetCleaner);
 }