Skip to content

Commit

Permalink
Introduce DistributedJmxProxy and DistributedJmxProxyFactory (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorCavichioli authored Oct 1, 2024
1 parent 64c8617 commit 785002f
Show file tree
Hide file tree
Showing 22 changed files with 1,678 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.0.0 (Not yet Released)

* Create DistributedJmxProxy and DistributedJmxProxyFactory - Issue #715
* Create a New Maven Module "utils" for Common Code Reuse - Issue #720
* Implement ReplicationStateImpl to Manage and Cache Token Range to Replica Mappings - Issue #719
* Implement NodeResolverImpl to Resolve Nodes by IP Address and UUID - Issue #718
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ public JMXConnector getJmxConnector(final UUID nodeID)
return myDistributedJmxConnectionProviderImpl.getJmxConnector(nodeID);
}

/**
* validate if the given JMXConnector is available.
*
* @param jmxConnector
* The jmxConnector to validate
* @return A boolean representing the node's connection status.
*/
@Override
public boolean isConnected(final JMXConnector jmxConnector)
{
return myDistributedJmxConnectionProviderImpl.isConnected(jmxConnector);
}
/**
* Closes the JMX connection associated with the specified node ID.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
@Service
public final class RetrySchedulerService implements DisposableBean
{

private static final Logger LOG = LoggerFactory.getLogger(RetrySchedulerService.class);
private static final String COLUMN_NODE_ID = "node_id";
private static final String COLUMN_NODE_STATUS = "node_status";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ public DistributedJmxConnectionProviderImpl(
myJMXConnections = jmxConnections;
}

private static boolean isConnected(final JMXConnector jmxConnector)
/**
* validate if the given JMXConnector is available.
*
* @param jmxConnector
* The jmxConnector to validate
* @return A boolean representing the node's connection status.
*/
@Override
public boolean isConnected(final JMXConnector jmxConnector)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public interface DistributedJmxConnectionProvider extends Closeable

JMXConnector getJmxConnector(UUID nodeID);

boolean isConnected(JMXConnector jmxConnector);

@Override
default void close() throws IOException
{
Expand Down
6 changes: 6 additions & 0 deletions core.impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.ericsson.bss.cassandra.ecchronos</groupId>
<artifactId>data</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Cassandra driver -->
<dependency>
<groupId>com.datastax.oss</groupId>
Expand Down
Loading

0 comments on commit 785002f

Please sign in to comment.