Package cz.metacentrum.perun.core.impl
Class ResourceAssignmentActivator
java.lang.Object
cz.metacentrum.perun.core.impl.ResourceAssignmentActivator
- All Implemented Interfaces:
ResourceAssignmentActivatorApi
,EventListener
,ApplicationListener<ContextRefreshedEvent>
public class ResourceAssignmentActivator
extends Object
implements ResourceAssignmentActivatorApi, ApplicationListener<ContextRefreshedEvent>
Component responsible for activating group-resource assignments in PROCESSING or FAILED state after Perun startup.
- Author:
- Radoslav Čerhák invalid input: '<'r.cerhak@gmail.com>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onApplicationEvent
(ContextRefreshedEvent contextRefreshedEvent) Tries to activate all group-resource assignments in PROCESSING or FAILED state after Spring context is refreshed or initialized, e.g.void
setPerunBl
(PerunBl perunBl) void
tryActivateAssignment
(GroupResourceAssignment assignment) Tries to activate assignment in transaction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
ResourceAssignmentActivator
-
-
Method Details
-
getPerunBl
-
onApplicationEvent
Tries to activate all group-resource assignments in PROCESSING or FAILED state after Spring context is refreshed or initialized, e.g. after Perun startup.This method runs asynchronously so it doesn't block other Spring events.
- Specified by:
onApplicationEvent
in interfaceApplicationListener<ContextRefreshedEvent>
-
setPerunBl
-
tryActivateAssignment
Tries to activate assignment in transaction.- Specified by:
tryActivateAssignment
in interfaceResourceAssignmentActivatorApi
- Parameters:
assignment
-
-