Interface ParallelFileHash

All Known Implementing Classes:
ParallelFileHashHandler

public interface ParallelFileHash
Interface for parallel file hash calculation. This interface defines methods to calculate SHA256, SHA3, and Blake2B hashes for a given file in parallel. It provides asynchronous computation using Future objects and supports shutting down the thread pool after all tasks are completed.
  • Method Details

    • calculateSha256HashFuture

      Future<String> calculateSha256HashFuture(File file)
      Calculates the SHA256 hash for a given file and returns a Future representing the pending result.
      Parameters:
      file - The file to be hashed.
      Returns:
      A Future containing the computed SHA256 hash.
    • calculateSha3HashFuture

      Future<String> calculateSha3HashFuture(File file)
      Calculates the SHA3 hash for a given file and returns a Future representing the pending result.
      Parameters:
      file - The file to be hashed.
      Returns:
      A Future containing the computed SHA3 hash.
    • calculateBlake2bHashFuture

      Future<String> calculateBlake2bHashFuture(File file)
      Calculates the Blake2B hash for a given file and returns a Future representing the pending result.
      Parameters:
      file - The file to be hashed.
      Returns:
      A Future containing the computed Blake2B hash.
    • GetAllHashesInParallel

      HashForFilesOutput GetAllHashesInParallel(File file)
      Calculates the hashes for a given file in parallel using SHA256, SHA3, and Blake2B algorithms.
      Parameters:
      file - The file to be hashed.
      Returns:
      An instance of HashForFilesOutput containing the calculated hashes.
    • shutdownThreadPool

      void shutdownThreadPool()
      Shuts down the thread pool and ensures all tasks are completed.