HashBucketPage.java
/**
   * Deletes the next pages after this one.  
   * 
   * To delete all the bucket pages after the primary , apply deleteNextPages to the
   * primary page of the bucket.
   * 
   */
Deletes the next pages after this one.

To delete all the bucket pages after the primary , apply deleteNextPages to the
primary page of the bucket.
Deletes the next pages after this one . To delete all the bucket pages after the primary apply deleteNextPages to the primary page of the bucket .
public void deleteNextPages() {
	  HashBucketPage nextPage = new HashBucketPage();
	  PageId nextPageId = this.getNextPage();
	  if (INVALID_PAGEID != nextPageId.pid)
	  {
		  Minibase.BufferManager.pinPage(nextPageId, nextPage, PIN_DISKIO);
		  if (INVALID_PAGEID != nextPage.getNextPage().pid)
		  {
			  nextPage.deleteNextPages();
		  }
		  Minibase.BufferManager.unpinPage(nextPageId, UNPIN_CLEAN);
		  Minibase.BufferManager.freePage(nextPageId);  
	  } 		    
  }
public void deleteNextPages ( ) { HashBucketPage nextPage = new HashBucketPage ( ) ; PageId nextPageId = this . getNextPage ( ) ; if ( INVALID_PAGEID != nextPageId . pid ) { Minibase . BufferManager . pinPage ( nextPageId , nextPage , PIN_DISKIO ) ; if ( INVALID_PAGEID != nextPage . getNextPage ( ) . pid ) { nextPage . deleteNextPages ( ) ; } Minibase . BufferManager . unpinPage ( nextPageId , UNPIN_CLEAN ) ; Minibase . BufferManager . freePage ( nextPageId ) ; } }
Deletes the next pages after this one.
Deletes the next pages after this one .
// We have another page after this one, so check that page to see if it has another page // There is another page after the next, so call deleteNextPages on the next page // Downstream pages (if any) should have been deleted by now so go ahead and delete the next page