docs: @Override
      public boolean load(String graphHopperFolder) {
          if (isEmpty(graphHopperFolder))
              throw new IllegalStateException("GraphHopperLocation is not specified. Call setGraphHopperLocation or init before");
  
          if (fullyLoaded)
              throw new IllegalStateException("graph is already successfully loaded");
  
          File tmpFileOrFolder = new File(graphHopperFolder);
  
          if (!tmpFileOrFolder.isDirectory() && tmpFileOrFolder.exists()) {
              throw new IllegalArgumentException("GraphHopperLocation cannot be an existing file. Has to be either non-existing or a folder.");
          } else {
              File compressed = new File(graphHopperFolder + ".ghz");
              if (compressed.exists() && !compressed.isDirectory()) {
                  try {
                      new Unzipper().unzip(compressed.getAbsolutePath(), graphHopperFolder, removeZipped);
                  } catch (IOException ex) {
                      throw new RuntimeException("Couldn't extract file " + compressed.getAbsolutePath()
                              + " to " + graphHopperFolder, ex);
                  }
              }
          }
  
          setGraphHopperLocation(graphHopperFolder);
  
          if (encodingManager == null)
              setEncodingManager(EncodingManager.create(flagEncoderFactory, ghLocation));
  
          if (!allowWrites && dataAccessType.isMMap())
              dataAccessType = DAType.MMAP_RO;
  
          GHDirectory dir = new GHDirectory(ghLocation, dataAccessType);
          GraphExtension ext = encodingManager.needsTurnCostsSupport()
                  ? new TurnCostExtension() : new GraphExtension.NoOpExtension();
  
          if (lmFactoryDecorator.isEnabled())
              initLMAlgoFactoryDecorator();
  
          if (chFactoryDecorator.isEnabled()) {
              initCHAlgoFactoryDecorator();
              ghStorage = new GraphHopperStorage(chFactoryDecorator.getNodeBasedWeightings(), chFactoryDecorator.getEdgeBasedWeightings(),
                      dir, encodingManager, hasElevation(), ext);
          } else {
              ghStorage = new GraphHopperStorage(dir, encodingManager, hasElevation(), ext);
          }
  
          ghStorage.setSegmentSize(defaultSegmentSize);
  
          if (!new File(graphHopperFolder).exists())
              return false;
  
          GHLock lock = null;
          try {
              // create locks only if writes are allowed, if they are not allowed a lock cannot be created 
              // (e.g. on a read only filesystem locks would fail)
              if (ghStorage.getDirectory().getDefaultType().isStoring() && isAllowWrites()) {
                  lockFactory.setLockDir(new File(ghLocation));
                  lock = lockFactory.create(fileLockName, false);
                  if (!lock.tryLock())
                      throw new RuntimeException("To avoid reading partial data we need to obtain the read lock but it failed. In " + ghLocation, lock.getObtainFailedReason());
              }
  
              if (!ghStorage.loadExisting())
                  return false;
  
              postProcessing();
              fullyLoaded = true;
              return true;
          } finally {
              if (lock != null)
                  lock.release();
          }
      }