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

            MemoryStatistics.RegisterLowMemoryHandler(this);
        }
 public PrefetchingBehavior(PrefetchingUser prefetchingUser, WorkContext context, BaseBatchSizeAutoTuner autoTuner)
 {
     this.context    = context;
     this.autoTuner  = autoTuner;
     PrefetchingUser = prefetchingUser;
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
 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;
 }
Beispiel #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>();
        }
Beispiel #6
0
 public CachedIndexedTerms()
 {
     MemoryStatistics.RegisterLowMemoryHandler(this);
 }
Beispiel #7
0
 static WebSocketTransportFactory()
 {
     MemoryStatistics.RegisterLowMemoryHandler(DisconnectWebSockets.Instance);
 }
Beispiel #8
0
            public IndexSearcherHoldingState(IndexSearcher indexSearcher)
            {
                IndexSearcher = indexSearcher;

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