示例#1
0
        /// <summary>
        /// Flushes a page to disk
        /// </summary>
        /// <param name="ID"></param>
        public void FlushPage(PageUID ID)
        {
            // Check if the page is in memory //
            if (!this.PageIsInMemory(ID))
            {
                throw new ObjectNotInMemoryException(string.Format("Page ID '{0}' is not memory; critical code error", ID));
            }

            Page p = this._PageStore[ID];

            // Check the version, only flush if the page has been altered //
            if (p.Version > 0)
            {
                TableStore.Flush(ID.Key, p);

                // #DEBUG# //
                this._Host.DebugPrint("TableStore.FlushPage-> page flushed to disk({0})", ID.ToString());
            }
            else
            {
                // #DEBUG# //
                this._Host.DebugPrint("TableStore.FlushPage-> page unaltered; not flushed({0})", ID.ToString());
            }
        }
示例#2
0
 public TableRef(Host Host, string Path)
 {
     this._Host    = Host;
     this._Key     = Path;
     this._Columns = TableStore.Buffer(Path).Columns;
 }