Package io.vertigo.core.impl.daemon
Class DaemonManagerImpl
java.lang.Object
io.vertigo.core.impl.daemon.DaemonManagerImpl
- All Implemented Interfaces:
DaemonManager,Activeable,Component,CoreComponent,Manager,DefinitionProvider,SimpleDefinitionProvider
public final class DaemonManagerImpl
extends Object
implements DaemonManager, Activeable, SimpleDefinitionProvider
Manager of all the daemons.
- Author:
- mlaroche, pchretien, npiedeloup
-
Constructor Summary
ConstructorsConstructorDescriptionDaemonManagerImpl(AnalyticsManager analyticsManager, Optional<Integer> threadPoolSize) Construct an instance of DaemonManagerImpl. -
Method Summary
Modifier and TypeMethodDescriptiongetStats()Provides a snapshot or copy of the execution statistics for all managed daemons.List<? extends Definition> provideDefinitions(DefinitionSpace definitionSpace) Provide definitions to be registered in the definitionSpacevoidstart()Initializes and activates the component.voidstop()Deactivates and prepares the component for destruction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertigo.core.node.definition.DefinitionProvider
addDefinitionResourceConfigMethods inherited from interface io.vertigo.core.node.definition.SimpleDefinitionProvider
get
-
Constructor Details
-
DaemonManagerImpl
@Inject public DaemonManagerImpl(AnalyticsManager analyticsManager, Optional<Integer> threadPoolSize) Construct an instance of DaemonManagerImpl.- Parameters:
analyticsManager- AnalyticsManagerthreadPoolSize- thread pool size (optional, default 2)
-
-
Method Details
-
provideDefinitions
Description copied from interface:SimpleDefinitionProviderProvide definitions to be registered in the definitionSpace- Specified by:
provideDefinitionsin interfaceSimpleDefinitionProvider- Parameters:
definitionSpace- the actual definitionSpace- Returns:
- the list of new definition to register
-
getStats
Provides a snapshot or copy of the execution statistics for all managed daemons. The returned list of DaemonStat objects contains information about the current execution statistics of each daemon managed by this DaemonManager.- Specified by:
getStatsin interfaceDaemonManager- Returns:
- a list of DaemonStat objects representing the execution statistics of managed daemons.
-
start
public void start()Initializes and activates the component. This method is called after the component has been created and fully initialized, typically after dependency injection for components built via configuration. Implementations should perform any necessary setup or resource allocation to prepare the component for use.- Specified by:
startin interfaceActiveable
-
stop
public void stop()Deactivates and prepares the component for destruction. This method is called before the component is stopped or destroyed. Implementations should release resources, terminate processes, or perform cleanup to ensure a graceful shutdown.- Specified by:
stopin interfaceActiveable
-
checkDaemonsExecs
-