Class FileIdGeneratorFactory

java.lang.Object
io.github.qubitpi.athena.file.identifier.FileIdGeneratorFactory

@Immutable @ThreadSafe public class FileIdGeneratorFactory extends Object
FileIdGeneratorFactory is an abstraction layer that hides the details of FileIdGenerator instance creation.

Please use getInstance() always to get instance of FileIdGenerator whenever needed.

  • Constructor Details

    • FileIdGeneratorFactory

      public FileIdGeneratorFactory()
  • Method Details

    • getInstance

      @NotNull public static @NotNull FileIdGenerator getInstance()
      Returns a cached and fully initialized FileIdGenerator object with the "MD5" as the default hashing algorithm.

      One can override the hashing algorithm by setting a config property whose key is file_id_hashing_algorithm.

      Returns:
      the same instance
      Throws:
      IllegalStateException - if the particular cryptographic algorithm is requested but is not available in the environment.