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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) Tries to activate all group-resource assignments in PROCESSING or FAILED state after Spring context is refreshed or initialized, e.g. after Perun startup.voidsetPerunBl(PerunBl perunBl) voidtryActivateAssignment(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, waitMethods 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:
onApplicationEventin interfaceApplicationListener<ContextRefreshedEvent>
-
setPerunBl
-
tryActivateAssignment
Tries to activate assignment in transaction.- Specified by:
tryActivateAssignmentin interfaceResourceAssignmentActivatorApi- Parameters:
assignment-
-