docs: @Override
      public CompletableFuture<Void> createAllLeasesIfNotExists(List<String> partitionIds) {
          CompletableFuture<Void> future = null;
  
          // Optimization: list the blobs currently existing in the directory. If there are the
          // expected number of blobs, then we can skip doing the creates.
          int blobCount = 0;
          try {
              Iterable<ListBlobItem> leaseBlobs = this.consumerGroupDirectory.listBlobs("", true, null, this.leaseOperationOptions, null);
              Iterator<ListBlobItem> blobIterator = leaseBlobs.iterator();
              while (blobIterator.hasNext()) {
                  blobCount++;
                  blobIterator.next();
              }
          } catch (URISyntaxException | StorageException e) {
              TRACE_LOGGER.error(this.hostContext.withHost("Exception checking lease existence - leaseContainerName: " + this.storageContainerName + " consumerGroupName: "
                      + this.hostContext.getConsumerGroupName() + " storageBlobPrefix: " + this.storageBlobPrefix), e);
              future = new CompletableFuture<Void>();
              future.completeExceptionally(LoggingUtils.wrapException(e, EventProcessorHostActionStrings.CREATING_LEASES));
          }
  
          if (future == null) {
              // No error checking the list, so keep going
              if (blobCount == partitionIds.size()) {
                  // All expected blobs found, so short-circuit
                  future = CompletableFuture.completedFuture(null);
              } else {
                  // Create the blobs in parallel
                  ArrayList<CompletableFuture<CompleteLease>> createFutures = new ArrayList<CompletableFuture<CompleteLease>>();
  
                  for (String id : partitionIds) {
                      CompletableFuture<CompleteLease> oneCreate = CompletableFuture.supplyAsync(() -> {
                          CompleteLease returnLease = null;
                          try {
                              returnLease = createLeaseIfNotExistsInternal(id, this.leaseOperationOptions);
                          } catch (URISyntaxException | IOException | StorageException e) {
                              TRACE_LOGGER.error(this.hostContext.withHostAndPartition(id,
                                      "Exception creating lease - leaseContainerName: " + this.storageContainerName + " consumerGroupName: " + this.hostContext.getConsumerGroupName()
                                              + " storageBlobPrefix: " + this.storageBlobPrefix), e);
                              throw LoggingUtils.wrapException(e, EventProcessorHostActionStrings.CREATING_LEASES);
                          }
                          return returnLease;
                      }, this.hostContext.getExecutor());
                      createFutures.add(oneCreate);
                  }
  
                  CompletableFuture<?>[] dummy = new CompletableFuture<?>[createFutures.size()];
                  future = CompletableFuture.allOf(createFutures.toArray(dummy));
              }
          }
  
          return future;
      }