public final class RedisNodeRegistryPlugin extends Object implements NodeRegistryPlugin
| Constructor and Description |
|---|
RedisNodeRegistryPlugin(RedisConnector redisConnector)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Node> |
find(String nodeId)
Find a node in the topology with the given id
|
List<Node> |
getTopology()
Get the whole topology of the app
|
void |
register(Node node)
Register a node
|
void |
unregister(Node node)
Unregister a node
|
void |
updateStatus(Node node)
Update the status of a node
|
@Inject public RedisNodeRegistryPlugin(RedisConnector redisConnector)
redisConnector - the redisConnectorpublic void register(Node node)
NodeRegistryPluginregister in interface NodeRegistryPluginnode - the node to registerpublic void unregister(Node node)
NodeRegistryPluginunregister in interface NodeRegistryPluginnode - the node to unregisterpublic Optional<Node> find(String nodeId)
NodeRegistryPluginfind in interface NodeRegistryPluginnodeId - the id to look forpublic void updateStatus(Node node)
NodeRegistryPluginupdateStatus in interface NodeRegistryPluginnode - the node to updatepublic List<Node> getTopology()
NodeRegistryPlugingetTopology in interface NodeRegistryPluginCopyright © 2018. All Rights Reserved.