Package energy.eddie.aiida.services
Class PermissionScheduler
java.lang.Object
energy.eddie.aiida.services.PermissionScheduler
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionScheduler(Clock clock, org.springframework.scheduling.TaskScheduler scheduler, PermissionRepository repository, ConcurrentMap<UUID, ScheduledFuture<?>> permissionFutures, StreamerManager streamerManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidremovePermission(UUID permissionId) Removes any scheduled start or expiration runnable for the specified ID.voidscheduleOrStart(AcceptedPermission 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.
-
Constructor Details
-
PermissionScheduler
public PermissionScheduler(Clock clock, org.springframework.scheduling.TaskScheduler scheduler, PermissionRepository repository, ConcurrentMap<UUID, ScheduledFuture<?>> permissionFutures, StreamerManager streamerManager)
-
-
Method Details
-
scheduleOrStart
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. The status of the permission is not changed, its connection state is derived at runtime byConnectionStatusService. -
removePermission
Removes any scheduled start or expiration runnable for the specified ID. E.g. when the permission is revoked or terminated.
-