Beispiel #1
0
 internal void  link(LRU node)
 {
     node.next = next;
     node.prev = this;
     next.prev = node;
     next = node;
 }
 internal void  link(LRU node)
 {
     node.next = next;
     node.prev = this;
     next.prev = node;
     next      = node;
 }
 internal virtual void close()
 {
     lock (this)
     {
         file.Close();
         hashTable  = null;
         dirtyPages = null;
         lru        = null;
         freePages  = null;
     }
 }
 void reset()
 {
     hashTable   = new Page[poolSize];
     dirtyPages  = new Page[poolSize];
     nDirtyPages = 0;
     lru         = new LRU();
     freePages   = null;
     if (!autoExtended)
     {
         for (int i = poolSize; --i >= 0;)
         {
             Page pg = new Page();
             pg.next   = freePages;
             freePages = pg;
         }
     }
 }
Beispiel #5
0
 internal void open(IFile f)
 {
     file        = f;
     hashTable   = new Page[poolSize];
     dirtyPages  = new Page[poolSize];
     nDirtyPages = 0;
     lru         = new LRU();
     freePages   = null;
     if (!autoExtended)
     {
         for (int i = poolSize; --i >= 0;)
         {
             Page pg = new Page();
             pg.next   = freePages;
             freePages = pg;
         }
     }
 }
 internal LRU()
 {
     next = prev = this;
 }
Beispiel #7
0
 internal LRU()
 {
     next = prev = this;
 }
 internal virtual void close()
 {
     lock(this)
     {
         file.Close();
         hashTable = null;
         dirtyPages = null;
         lru = null;
         freePages = null;
     }
 }
 void reset()
 {
     hashTable = new Page[poolSize];
     dirtyPages = new Page[poolSize];
     nDirtyPages = 0;
     lru = new LRU();
     freePages = null;
     if (!autoExtended) { 
         for (int i = poolSize; --i >= 0; )
         {
             Page pg = new Page();
             pg.next = freePages;
             freePages = pg;
         }
     }
 }