Class PermissionScheduler

java.lang.Object
energy.eddie.aiida.services.PermissionScheduler

@Service public class PermissionScheduler extends Object
  • Constructor Details

  • Method Details

    • scheduleOrStart

      public Permission scheduleOrStart(Permission permission)
      If the start date of the permission is in the past or now, the streaming is directly started, otherwise a Runnable will be scheduled to start the permission once its start time has been reached.
      Returns:
      The updated permission object. It is already persisted in the database.
    • removePermission

      public void removePermission(UUID permissionId)
      Removes any scheduled start or expiration runnable for the specified ID. E.g. when the permission is revoked or terminated.