private long calculateRecordSize(Record record) {
   return sizeEstimator.getCost(record);
 }
 private void resetSizeEstimator() {
   sizeEstimator.reset();
 }
 private void updateSizeEstimator(long recordSize) {
   sizeEstimator.add(recordSize);
 }