@Override
  public synchronized boolean forEach(@NotNull KeyValueProcessor processor) throws IOException {
    checkNotClosed();
    int segmentSize = header.segmentSize();
    int segmentsCount = header.actualSegmentsCount();
    for (int segmentIndex = 1; segmentIndex <= segmentsCount; segmentIndex++) {
      HashMapSegmentLayout segment = new HashMapSegmentLayout(bufferSource, segmentIndex, segmentSize);
      if (segment.aliveEntriesCount() > 0) {
        if (!hashMapAlgo.forEach(segment, processor)) {
          return false;
        }
      }
    }
    return true;
  }
@Override
  public synchronized boolean forEach(@NotNull KeyValueProcessor processor)