HashBucketPage.java
/**
   * Gets the number of entries in this page and later
   * (overflow) pages in the list.
   * <br><br>
   * To find the number of entries in a bucket, apply 
   * countEntries to the primary page of the bucket.
   */
Gets the number of entries in this page and later
(overflow) pages in the list.

To find the number of entries in a bucket, apply
countEntries to the primary page of the bucket.
Gets the number of entries in this page and later ( overflow ) pages in the list . To find the number of entries in a bucket apply countEntries to the primary page of the bucket .
public int countEntries() {
	  int entryCount = 0;
	  PageId nextPageId = new PageId();
	  nextPageId = this.getNextPage();
	  if (INVALID_PAGEID != nextPageId.pid) 
	  {
		  HashBucketPage nextPage = new HashBucketPage();
		  Minibase.BufferManager.pinPage(nextPageId, nextPage, PIN_DISKIO);
		  entryCount += nextPage.countEntries();
		  Minibase.BufferManager.unpinPage(nextPageId, UNPIN_CLEAN); 
	  } 
	  entryCount += getEntryCount();
	  return entryCount;
  }
public int countEntries ( ) { int entryCount = 0 ; PageId nextPageId = new PageId ( ) ; nextPageId = this . getNextPage ( ) ; if ( INVALID_PAGEID != nextPageId . pid ) { HashBucketPage nextPage = new HashBucketPage ( ) ; Minibase . BufferManager . pinPage ( nextPageId , nextPage , PIN_DISKIO ) ; entryCount += nextPage . countEntries ( ) ; Minibase . BufferManager . unpinPage ( nextPageId , UNPIN_CLEAN ) ; } entryCount += getEntryCount ( ) ; return entryCount ; }
Gets the number of entries in this page and later
 (overflow) pages in the list.
Gets the number of entries in this page and later ( overflow ) pages in the list .
// If there is another page after this one, add its count (and any subsequent pages' counts to the total). // Leave page unpinned // Add this page's count to the total