Deveel.Data.Store.ObjectStore.Create C# (CSharp) Метод

Create() публичный Метод

public Create ( ) : long
Результат long
        public long Create()
        {
            // Init the fixed record list area.
            // The fixed list entries are formatted as follows;
            //  ( status (int), reference_count (int),
            //    blob_size (long), blob_pointer (long) )
            long fixedListOffset = fixedList.Create();

            // Delete chain is empty when we start
            firstDeleteChainRecord = -1;
            fixedList.WriteDeleteHead(-1);

            // Allocate a small header that contains the MAGIC, and the pointer to the
            // fixed list structure.
            IArea blobStoreHeader = store.CreateArea(32);
            long blobStoreId = blobStoreHeader.Id;

            blobStoreHeader.WriteInt4(Magic);	// Magic
            blobStoreHeader.WriteInt4(1);		// The data version
            blobStoreHeader.WriteInt8(fixedListOffset);
            blobStoreHeader.Flush();

            // Return the pointer to the blob store header
            return blobStoreId;
        }

Usage Example

Пример #1
0
 public void TestSetUp()
 {
     storageSystem = new InMemoryStorageSystem();
     testStore = storageSystem.CreateStore("TestStore");
     objStore = new ObjectStore(1, testStore);
     objStore.Create();
 }
All Usage Examples Of Deveel.Data.Store.ObjectStore::Create