Class JobsUtility

java.lang.Object
overit.geocall.scheduler.JobsUtility

@ApplicationScope @Component public class JobsUtility extends Object
Utility class used to register and retrieve the information about the jobs enqueued phase by the companies.
  • Constructor Details

    • JobsUtility

      public JobsUtility()
  • Method Details

    • registerCompany

      public void registerCompany(Long companyId)
      Register that a specific company has enqueued all its jobs
      Parameters:
      companyId - The id of the company
    • isCompanyRegistered

      public boolean isCompanyRegistered(Long companyId)
      Gets if a specific company has enqueued all its jobs
      Parameters:
      companyId - The id of the company
      Returns:
      true if a company has enqueued all its jobs and it has been registered, false otherwise
    • areCompaniesRegistered

      public boolean areCompaniesRegistered(List<Company> companiesIds)
      Gets if the list of company passed as parameters has enqueued all their jobs
      Parameters:
      companiesIds - The ids of the companies
      Returns:
      true if the list of company passed as parameters has enqueued all their jobs, false otherwise