Class ModuleSizeCalculator

java.lang.Object
dev.jcputney.elearning.parser.config.ModuleSizeCalculator

public final class ModuleSizeCalculator extends Object
Configuration utility for controlling module size calculation in module parsers.

Module size calculation determines the total disk size of all files in a module package. While useful for metadata reporting, this can be expensive for modules with many files (e.g., HLS video streams with thousands of .ts segments) as it requires listing and measuring all files in the module.

Size calculation is disabled by default. It can be enabled via:

  • System property elearning.parser.calculateModuleSize=true
  • Environment variable ELEARNING_CALCULATE_MODULE_SIZE=true
  • Programmatically via ParserOptions
  • Method Details

    • isEnabled

      public static boolean isEnabled()
      Determines whether module size calculation is enabled based on system properties or environment variables.
      Returns:
      true if size calculation is enabled; otherwise false.