@Override
  public synchronized boolean isEmpty() throws IOException {
    checkNotClosed();
    int segmentSize = header.segmentSize();
    int segmentsCount = header.actualSegmentsCount();
    for (int segmentIndex = 1; segmentIndex <= segmentsCount; segmentIndex++) {
      int aliveEntriesCount = HashMapSegmentLayout.aliveEntriesCount(bufferSource, segmentIndex, segmentSize);
      if (aliveEntriesCount > 0) {
        return false;
      }
    }
    return true;
  }
@Override
  public synchronized boolean isEmpty()