All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.jhipster.lite.module.infrastructure.secondary.docker.JHipsterDockerImages Maven / Gradle / Ivy

There is a newer version: 1.18.1
Show newest version
package tech.jhipster.lite.module.infrastructure.secondary.docker;

import java.util.Collection;
import java.util.function.Supplier;
import org.springframework.stereotype.Repository;
import tech.jhipster.lite.module.domain.docker.DockerImageVersions;
import tech.jhipster.lite.module.domain.docker.DockerImages;
import tech.jhipster.lite.shared.memoizer.domain.Memoizers;

@Repository
class JHipsterDockerImages implements DockerImages {

  private final Supplier versions;

  public JHipsterDockerImages(Collection readers) {
    versions = Memoizers.of(versionsReader(readers));
  }

  private Supplier versionsReader(Collection readers) {
    return () -> readers.stream().map(DockerImagesReader::get).reduce(DockerImageVersions.EMPTY, DockerImageVersions::merge);
  }

  @Override
  public DockerImageVersions get() {
    return versions.get();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy