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 class
AppManagerImpl.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 appAppNode
getCurrentNode()
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 skillvoid
start()
void
stop()
void
updateNodeStatus()
-
-
-
Constructor Detail
-
AppManagerImpl
@Inject public AppManagerImpl(Optional<AppNodeRegistryPlugin> nodeRegistryPluginOpt, List<AppNodeInfosPlugin> nodeInfosPlugins)
-
-
Method Detail
-
updateNodeStatus
public void updateNodeStatus()
-
start
public void start()
- Specified by:
start
in interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stop
in interfaceio.vertigo.core.node.component.Activeable
-
find
public Optional<AppNode> find(String nodeId)
Description copied from interface:AppManager
Find a node by an id- Specified by:
find
in interfaceAppManager
- Parameters:
nodeId
- the id to look for- Returns:
- the optional found Node
-
locateSkills
public List<AppNode> locateSkills(String... skills)
Description copied from interface:AppManager
Find node with a given skill- Specified by:
locateSkills
in interfaceAppManager
- Parameters:
skills
- the skills to look for- Returns:
- the Node matching the skills
-
getTopology
public List<AppNode> getTopology()
Description copied from interface:AppManager
Get the whole topology of an app- Specified by:
getTopology
in interfaceAppManager
- Returns:
- the topology
-
getCurrentNode
public AppNode getCurrentNode()
Description copied from interface:AppManager
Get the current node- Specified by:
getCurrentNode
in interfaceAppManager
- Returns:
- the current node
-
getDeadNodes
public List<AppNode> getDeadNodes()
Description copied from interface:AppManager
List the dead nodes of the app- Specified by:
getDeadNodes
in interfaceAppManager
- Returns:
- the dead nodes
-
getStatus
public Map<String,List<io.vertigo.core.analytics.health.HealthCheck>> getStatus()
Description copied from interface:AppManager
A consolidated view of the cluster (id+status)- Specified by:
getStatus
in interfaceAppManager
- Returns:
- the overall status
-
getStats
public Map<String,Object> getStats()
Description copied from interface:AppManager
A consolidated view of the stats of the app- Specified by:
getStats
in interfaceAppManager
- Returns:
- the overall stats
-
getConfig
public Map<String,String> getConfig()
Description copied from interface:AppManager
A consolidated view of the config of the app- Specified by:
getConfig
in interfaceAppManager
- Returns:
- the overall config
-
-