public void Initialize()
        {
            bool runInMemory;
            bool.TryParse(settings["Raven/RunInMemory"], out runInMemory);

            var persistenceSource = runInMemory ? StorageEnvironmentOptions.CreateMemoryOnly() :
                CreateStorageOptionsFromConfiguration(path, settings);

            tableStorage = new TableStorage(persistenceSource, bufferPool);
	        var schemaCreator = new SchemaCreator(configuration, tableStorage, Output, Log);
			schemaCreator.CreateSchema();
			schemaCreator.SetupDatabaseIdAndSchemaVersion();
			schemaCreator.UpdateSchemaIfNecessary();

            SetupDatabaseId();
            idGenerator = new IdGenerator(tableStorage);
        }
 public StorageActionsAccessor(TableStorage storage, Reference<WriteBatch> writeBatch, SnapshotReader snapshot, IdGenerator generator, IBufferPool bufferPool)
     : base(snapshot, generator, bufferPool)
 {
     this.storage = storage;
     this.writeBatch = writeBatch;
 }
Example #3
0
 protected StorageActionsBase(SnapshotReader snapshot, IdGenerator idGenerator, IBufferPool bufferPool)
 {
     this.bufferPool = bufferPool;
     Snapshot        = snapshot;
     IdGenerator     = idGenerator;
 }
        protected StorageActionsBase(SnapshotReader snapshot, IdGenerator idGenerator, IBufferPool bufferPool)
		{
		    this.bufferPool = bufferPool;
			Snapshot = snapshot;
		    IdGenerator = idGenerator;
		}
Example #5
0
 public StorageActionsAccessor(TableStorage storage, Reference <WriteBatch> writeBatch, SnapshotReader snapshot, IdGenerator generator, IBufferPool bufferPool)
     : base(snapshot, generator, bufferPool)
 {
     this.storage    = storage;
     this.writeBatch = writeBatch;
 }
Example #6
0
        public void Initialize()
        {
            bool runInMemory;
            bool.TryParse(settings["Raven/RunInMemory"], out runInMemory);

            var persistenceSource = runInMemory ? StorageEnvironmentOptions.CreateMemoryOnly() :
                CreateStorageOptionsFromConfiguration(path, settings);

            tableStorage = new TableStorage(persistenceSource, bufferPool);
            SetupDatabaseId();

            idGenerator = new IdGenerator(tableStorage);

        }