Skip to content

Commit

Permalink
Ericsson#699 Reload nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Chandler committed Oct 11, 2024
1 parent e049899 commit bed7775
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,21 @@ public void close(final UUID nodeID) throws IOException
{
myJMXConnections.get(nodeID).close();
}

/**
* Add a node and create a JMXconnection
* @param node
* @throws IOException
*/
@Override
public void add(final Node node) throws IOException
{
try {
try
{
myDistributedJmxBuilder.reconnect(node);
} catch (EcChronosException e) {
}
catch (EcChronosException e)
{
throw new RuntimeException(e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,24 @@ public List<Node> getNodes()
{
return myNodes;
}

/***
* Replaces the current node list with a new one
* @param nodes
*/
@Override
public void setNodes(List<Node> nodes)
public void setNodes(final List<Node> nodes)
{
myNodes = nodes;
}

/***
* Reloads the list of nodes from the database
* @return list of nodes
*/
@Override
public List<Node> reloadNodes(){
public List<Node> reloadNodes()
{
return myDistributedNativeBuilder.createNodesList(mySession);
}

Expand Down

0 comments on commit bed7775

Please sign in to comment.