public long refresh(boolean force) {
    if (!force) {
      long delay = EnvironmentEdgeManager.currentTime() - lastRefreshTimestamp;
      if (delay < refreshDelay.get()) {
        return refreshDelay.get() - delay;
      }
    }

    TerminalSize newTerminalSize = topScreenView.doResizeIfNecessary();
    if (newTerminalSize != null) {
      updateTerminalLengthAndPageSize(newTerminalSize, topScreenView.getPageSize());
      topScreenView.clearTerminal();
    }

    topScreenModel.refreshMetricsData();
    paging.updateRecordsSize(topScreenModel.getRecords().size());

    adjustFieldLengthIfNeeded();

    topScreenView.showTopScreen(topScreenModel.getSummary(), getDisplayedHeaders(),
      getDisplayedRecords(), getSelectedRecord());

    topScreenView.refreshTerminal();

    lastRefreshTimestamp = EnvironmentEdgeManager.currentTime();
    iterations++;
    return refreshDelay.get();
  }
The presentation logic for the top screen.
hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java