Package io.vertigo.commons.impl.app
Class AppManagerImpl
- java.lang.Object
-
- io.vertigo.commons.impl.app.AppManagerImpl
-
- All Implemented Interfaces:
AppManager,io.vertigo.core.node.component.Activeable,io.vertigo.core.node.component.Component,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Manager
public final class AppManagerImpl extends Object implements AppManager, io.vertigo.core.node.component.Activeable
Implementation of the NodeManager.- Author:
- mlaroche
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAppManagerImpl.NodeStatus
-
Constructor Summary
Constructors Constructor Description AppManagerImpl(Optional<AppNodeRegistryPlugin> nodeRegistryPluginOpt, List<AppNodeInfosPlugin> nodeInfosPlugins)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<AppNode>find(String nodeId)Find a node by an idMap<String,String>getConfig()A consolidated view of the config of the appAppNodegetCurrentNode()Get the current nodeList<AppNode>getDeadNodes()List the dead nodes of the appMap<String,Object>getStats()A consolidated view of the stats of the appMap<String,List<io.vertigo.core.analytics.health.HealthCheck>>getStatus()A consolidated view of the cluster (id+status)List<AppNode>getTopology()Get the whole topology of an appList<AppNode>locateSkills(String... skills)Find node with a given skillvoidstart()voidstop()voidupdateNodeStatus()
-
-
-
Constructor Detail
-
AppManagerImpl
@Inject public AppManagerImpl(Optional<AppNodeRegistryPlugin> nodeRegistryPluginOpt, List<AppNodeInfosPlugin> nodeInfosPlugins)
-
-
Method Detail
-
updateNodeStatus
public void updateNodeStatus()
-
start
public void start()
- Specified by:
startin interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stopin interfaceio.vertigo.core.node.component.Activeable
-
find
public Optional<AppNode> find(String nodeId)
Description copied from interface:AppManagerFind a node by an id- Specified by:
findin interfaceAppManager- Parameters:
nodeId- the id to look for- Returns:
- the optional found Node
-
locateSkills
public List<AppNode> locateSkills(String... skills)
Description copied from interface:AppManagerFind node with a given skill- Specified by:
locateSkillsin interfaceAppManager- Parameters:
skills- the skills to look for- Returns:
- the Node matching the skills
-
getTopology
public List<AppNode> getTopology()
Description copied from interface:AppManagerGet the whole topology of an app- Specified by:
getTopologyin interfaceAppManager- Returns:
- the topology
-
getCurrentNode
public AppNode getCurrentNode()
Description copied from interface:AppManagerGet the current node- Specified by:
getCurrentNodein interfaceAppManager- Returns:
- the current node
-
getDeadNodes
public List<AppNode> getDeadNodes()
Description copied from interface:AppManagerList the dead nodes of the app- Specified by:
getDeadNodesin interfaceAppManager- Returns:
- the dead nodes
-
getStatus
public Map<String,List<io.vertigo.core.analytics.health.HealthCheck>> getStatus()
Description copied from interface:AppManagerA consolidated view of the cluster (id+status)- Specified by:
getStatusin interfaceAppManager- Returns:
- the overall status
-
getStats
public Map<String,Object> getStats()
Description copied from interface:AppManagerA consolidated view of the stats of the app- Specified by:
getStatsin interfaceAppManager- Returns:
- the overall stats
-
getConfig
public Map<String,String> getConfig()
Description copied from interface:AppManagerA consolidated view of the config of the app- Specified by:
getConfigin interfaceAppManager- Returns:
- the overall config
-
-