public void updatePageSize(int pageSize) {
    this.pageSize = pageSize;

    if (pageSize == 0) {
      pageStartPosition = 0;
      pageEndPosition = 0;
    } else {
      pageEndPosition = pageStartPosition + pageSize;
      keepConsistent();
    }
  }
Utility class for paging for the metrics.
hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/Paging.java