public StorageActionsAccessor(TableStorage storage, Reference<WriteBatch> writeBatch, Reference<SnapshotReader> snapshot, IdGenerator generator, IBufferPool bufferPool, OrderedPartCollection<AbstractFileCodec> fileCodecs)
            : base(snapshot, generator, bufferPool)
        {
            this.storage = storage;
            this.writeBatch = writeBatch;
	        this.fileCodecs = fileCodecs;
        }
Esempio n. 2
0
 protected StorageActionsBase(Reference<SnapshotReader> snapshotReference, IdGenerator idGenerator, IBufferPool bufferPool)
 {
     this.snapshotReference = snapshotReference;
     this.bufferPool = bufferPool;
     IdGenerator = idGenerator;
 }
        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);
        }
Esempio n. 4
0
        public void Initialize(UuidGenerator generator, OrderedPartCollection<AbstractFileCodec> codecs)
        {
            if (codecs == null)
                throw new ArgumentNullException("codecs");

            fileCodecs = codecs;
            uuidGenerator = generator;

            bool runInMemory;
            bool.TryParse(settings[Constants.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);
        }
Esempio n. 5
0
 public StorageActionsAccessor(TableStorage storage, Reference <WriteBatch> writeBatch, Reference <SnapshotReader> snapshot, IdGenerator generator, IBufferPool bufferPool, UuidGenerator uuidGenerator, OrderedPartCollection <AbstractFileCodec> fileCodecs)
     : base(snapshot, generator, bufferPool)
 {
     this.storage       = storage;
     this.writeBatch    = writeBatch;
     this.uuidGenerator = uuidGenerator;
     this.fileCodecs    = fileCodecs;
 }
        protected StorageActionsBase(SnapshotReader snapshot, IdGenerator idGenerator, IBufferPool bufferPool)
		{
		    this.bufferPool = bufferPool;
			Snapshot = snapshot;
		    IdGenerator = idGenerator;
		}
Esempio n. 7
0
 protected StorageActionsBase(Reference <SnapshotReader> snapshotReference, IdGenerator idGenerator, IBufferPool bufferPool)
 {
     this.snapshotReference = snapshotReference;
     this.bufferPool        = bufferPool;
     IdGenerator            = idGenerator;
 }
 public StorageActionsAccessor(TableStorage storage, Reference<WriteBatch> writeBatch, SnapshotReader snapshot, IdGenerator generator, IBufferPool bufferPool)
     : base(snapshot, generator, bufferPool)
 {
     this.storage = storage;
     this.writeBatch = writeBatch;
 }