Esempio n. 1
0
		public RavenFileSystem(InMemoryRavenConfiguration systemConfiguration, string name, TransportState recievedTransportState = null)
		{
		    this.Name = name;
			this.systemConfiguration = systemConfiguration;

            storage = CreateTransactionalStorage(systemConfiguration);
			search = new IndexStorage(systemConfiguration.FileSystem.IndexStoragePath, systemConfiguration.Settings);
			sigGenerator = new SigGenerator();
			var replicationHiLo = new SynchronizationHiLo(storage);
			var sequenceActions = new SequenceActions(storage);
			transportState = recievedTransportState ?? new TransportState();
			notificationPublisher = new NotificationPublisher(transportState);
			fileLockManager = new FileLockManager();
			storage.Initialize();
			search.Initialize();
			var uuidGenerator = new UuidGenerator(sequenceActions);
			historian = new Historian(storage, replicationHiLo, uuidGenerator);
			BufferPool = new BufferPool(1024 * 1024 * 1024, 65 * 1024);
			conflictArtifactManager = new ConflictArtifactManager(storage, search);
			conflictDetector = new ConflictDetector();
			conflictResolver = new ConflictResolver(storage, new CompositionContainer(systemConfiguration.Catalog));
			synchronizationTask = new SynchronizationTask(storage, sigGenerator, notificationPublisher, systemConfiguration);
			storageOperationsTask = new StorageOperationsTask(storage, search, notificationPublisher);
            metricsCounters = new MetricsCountersManager();

			AppDomain.CurrentDomain.ProcessExit += ShouldDispose;
			AppDomain.CurrentDomain.DomainUnload += ShouldDispose;
		}
Esempio n. 2
0
        public void Initialize ()
        {
            this.storage.Initialize();

            var replicationHiLo = new SynchronizationHiLo(storage);
            var sequenceActions = new SequenceActions(storage);
            var uuidGenerator = new UuidGenerator(sequenceActions);
            this.historian = new Historian(storage, replicationHiLo, uuidGenerator);

            this.search.Initialize(this);
        }
Esempio n. 3
0
        public void Initialize()
        {
            storage.Initialize(FileCodecs);

            var replicationHiLo = new SynchronizationHiLo(storage);
            var sequenceActions = new SequenceActions(storage);
            var uuidGenerator = new UuidGenerator(sequenceActions);
            historian = new Historian(storage, replicationHiLo, uuidGenerator);

            search.Initialize(this);

			InitializeTriggersExceptIndexCodecs();
			SecondStageInitialization();
        }
Esempio n. 4
0
 public UuidGenerator(SequenceActions sequenceActions)
 {
     this.sequenceActions = sequenceActions;
     currentEtagBase      = sequenceActions.GetNextValue("Raven/Etag");
 }
Esempio n. 5
0
		public UuidGenerator(SequenceActions sequenceActions)
		{
			this.sequenceActions = sequenceActions;
			currentEtagBase = sequenceActions.GetNextValue("Raven/Etag");
		}