@Override
  public void force() throws IOException {
    checkNotClosed();
    pagedStorage.lockWrite();
    try {
      final DirectBufferWrapper headerPage = pagedStorage.getByteBuffer(0, /*forWrite: */ true);
      try {
        putHeaderInt(HeaderLayout.NEXT_RECORD_ID_OFFSET, nextRecordId());
        putHeaderInt(HeaderLayout.RECORDS_ALLOCATED_OFFSET, recordsAllocated.get());
        putHeaderInt(HeaderLayout.RECORDS_RELOCATED_OFFSET, recordsRelocated.get());
        putHeaderInt(HeaderLayout.RECORDS_DELETED_OFFSET, recordsDeleted.get());
        putHeaderLong(HeaderLayout.RECORDS_LIVE_TOTAL_PAYLOAD_SIZE_OFFSET, totalLiveRecordsPayloadBytes.get());
        putHeaderLong(HeaderLayout.RECORDS_LIVE_TOTAL_CAPACITY_SIZE_OFFSET, totalLiveRecordsCapacityBytes.get());

        headerPage.fileSizeMayChanged(HeaderLayout.HEADER_SIZE);
        headerPage.markDirty();
      }
      finally {
        headerPage.unlock();
      }
      pagedStorage.force();
    }
    finally {
      pagedStorage.unlockWrite();
    }
  }
@Override
  public void force()