docs: private void recoverSegment(long segmentIndex, long segmentId, PbdSegmentName segmentName) throws IOException {
          PBDSegment segment;
          if (segmentName.m_quarantined) {
              segment = new PbdQuarantinedSegment(segmentName.m_file, segmentIndex, segmentId);
          } else {
              segment = newSegment(segmentIndex, segmentId, segmentName.m_file);
  
              try {
                  if (segment.getNumEntries() == 0) {
                      if (m_usageSpecificLog.isDebugEnabled()) {
                          m_usageSpecificLog.debug("Found Empty Segment with entries: " + segment.getNumEntries()
                                  + " For: " + segment.file().getName());
                          m_usageSpecificLog.debug("Segment " + segment.file() + " (final: " + segment.isFinal()
                                  + "), will be closed and deleted during init");
                      }
                      segment.closeAndDelete();
                      return;
                  }
  
                  // Any recovered segment that is not final should be checked
                  // for internal consistency.
                  if (!segment.isFinal()) {
                      m_usageSpecificLog.warn("Segment " + segment.file() + " (final: " + segment.isFinal()
                              + "), has been recovered but is not in a final state");
                  } else if (m_usageSpecificLog.isDebugEnabled()) {
                      m_usageSpecificLog.debug(
                              "Segment " + segment.file() + " (final: " + segment.isFinal() + "), has been recovered");
                  }
                  m_segments.put(segment.segmentIndex(), segment);
              } catch (IOException e) {
                  m_usageSpecificLog.warn(
                          "Failed to retrieve entry count from segment " + segment.file() + ". Quarantining segment", e);
                  quarantineSegment(segment);
                  return;
              } finally {
                  segment.close();
              }
          }
          m_segments.put(segment.segmentIndex(), segment);
      }