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 Nov 4, 2024
1 parent 5af2006 commit 271cce2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class AgentNativeConnectionProvider implements DistributedNativeConnectio

private final DistributedNativeConnectionProviderImpl myDistributedNativeConnectionProviderImpl;


/**
* Constructs an {@code AgentNativeConnectionProvider} with the specified configuration, security supplier, and
* certificate handler.
Expand Down Expand Up @@ -86,8 +85,7 @@ public AgentNativeConnectionProvider(
sslEngineFactory = certificateHandler;
}

// myNodeStateListener = new EccNodeStateListener();
DistributedNativeBuilder nativeConnectionBuilder =
DistributedNativeBuilder nativeConnectionBuilder =
DistributedNativeConnectionProviderImpl.builder()
.withInitialContactPoints(resolveInitialContactPoints(agentConnectionConfig.getContactPoints()))
.withAgentType(agentConnectionConfig.getType())
Expand Down Expand Up @@ -276,7 +274,6 @@ public List<Node> getNodes()
return myDistributedNativeConnectionProviderImpl.getNodes();
}


/**
* Closes all resources and connections managed by this provider.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,11 @@ private DistributedNativeConnectionProvider getDistributedNativeConnection(
{
Supplier<CqlTLSConfig> tlsSupplier = () -> securitySupplier.get().getCqlTlsConfig();
CertificateHandler certificateHandler = createCertificateHandler(tlsSupplier);

AgentNativeConnectionProvider distributedNativeConnectionProvider = new AgentNativeConnectionProvider(
return new AgentNativeConnectionProvider(
config,
securitySupplier,
certificateHandler,
defaultRepairConfigurationProvider);

return distributedNativeConnectionProvider;

}

private DistributedJmxConnectionProvider getDistributedJmxConnection(
Expand All @@ -290,9 +286,8 @@ private DistributedJmxConnectionProvider getDistributedJmxConnection(
final EccNodesSync eccNodesSync
) throws IOException
{
AgentJmxConnectionProvider agentJmxConnectionProvider = new AgentJmxConnectionProvider(
return new AgentJmxConnectionProvider(
securitySupplier, distributedNativeConnectionProvider, eccNodesSync);
return agentJmxConnectionProvider;
}

private void refreshSecurityConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ private static CqlSessionBuilder fromBuilder(final DistributedNativeBuilder buil
.withSslEngineFactory(builder.mySslEngineFactory)
.withSchemaChangeListener(builder.mySchemaChangeListener)
.withNodeStateListener(builder.myNodeStateListener);

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private DefaultRepairConfigurationProvider(final Builder builder)
myJmxConnectionProvider = builder.myJmxConnectionProvider;
myAgentNativeConnectionProvider = builder.myAgentNativeConnectionProvider;


setupConfiguration();
myService = Executors.newFixedThreadPool(NO_OF_THREADS);
}
Expand Down Expand Up @@ -632,8 +631,7 @@ public Builder withDistributedNativeConnectionProvider(final DistributedNativeCo
myAgentNativeConnectionProvider = agentNativeConnectionProvider;
return this;
}



/**
* Build with DistributedJmxConnectionProvider.
* @param jmxConnectionProvider
Expand Down

0 comments on commit 271cce2

Please sign in to comment.