Пример #1
0
 public DocumentDatabase(string name, RavenConfiguration configuration, ServerStore serverStore)
 {
     StartTime                 = SystemTime.UtcNow;
     Name                      = name;
     ResourceName              = "db/" + name;
     Configuration             = configuration;
     _logger                   = LoggingSource.Instance.GetLogger <DocumentDatabase>(Name);
     Notifications             = new DocumentsNotifications();
     DocumentsStorage          = new DocumentsStorage(this);
     IndexStore                = new IndexStore(this);
     TransformerStore          = new TransformerStore(this);
     SqlReplicationLoader      = new SqlReplicationLoader(this);
     DocumentReplicationLoader = new DocumentReplicationLoader(this);
     DocumentTombstoneCleaner  = new DocumentTombstoneCleaner(this);
     SubscriptionStorage       = new SubscriptionStorage(this);
     Operations                = new DatabaseOperations(this);
     Metrics                   = new MetricsCountersManager();
     IoMetrics                 = serverStore?.IoMetrics ?? new IoMetrics(256, 256);
     Patch                     = new PatchDocument(this);
     TxMerger                  = new TransactionOperationsMerger(this, DatabaseShutdown);
     HugeDocuments             = new HugeDocuments(configuration.Databases.MaxCollectionSizeHugeDocuments,
                                                   configuration.Databases.MaxWarnSizeHugeDocuments);
     ConfigurationStorage = new ConfigurationStorage(this, serverStore);
     DatabaseInfoCache    = serverStore?.DatabaseInfoCache;
 }
Пример #2
0
 public DocumentsTransaction(DocumentsOperationContext context, Transaction transaction, DocumentsNotifications notifications)
     : base(transaction)
 {
     _context       = context;
     _notifications = notifications;
 }