Esempio n. 1
0
        public void CanPinNewBuffer()
        {
            _buffersList = new TransactionBuffersList(_bufferManager);

            Assert.DoesNotThrow(() =>
            {
                _buffersList.PinNew(RandomFilename, new BasePageFormatter());
            });
        }
Esempio n. 2
0
        public Block Append(string filename, IPageFormatter pageFormatter)
        {
            // A dummy block because honestly we do not care about block, we need to get length of this file
            var dummyBlock = new Block(filename, -1);

            _concurrencyManager.ExclusiveLock(dummyBlock);

            var lastBlock = _bufferList.PinNew(filename, pageFormatter);

            return(lastBlock);
        }