Skip to content

Commit

Permalink
Ericsson#674 Specify Interval for Next Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Chandler committed Sep 3, 2024
1 parent 9b1006b commit 6665095
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public String getLocalDatacenter()
}

/**
* Sets the connectionDelay used to specify the time until the next connection
* Sets the connectionDelay used to specify the time until the next connection.
*
* @param connectionDelay
* the local datacenter to set.
Expand All @@ -118,7 +118,7 @@ public void setConnectionDelay(final Integer connectionDelay)
myConnectionDelay = connectionDelay;
}
/**
* Gets the connectionDelay used to specify the time until the next connection
* Gets the connectionDelay used to specify the time until the next connection.
*
* @return the connectionDelay.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ public DistributedNativeConnectionProvider distributedNativeConnectionProvider(
@Bean
public EccNodesSync eccNodesSync(
final DistributedNativeConnectionProvider distributedNativeConnectionProvider
) throws UnknownHostException, EcChronosException, ConfigurationException {
) throws UnknownHostException, EcChronosException, ConfigurationException
{
return getEccNodesSync(distributedNativeConnectionProvider);
}

Expand Down Expand Up @@ -266,12 +267,13 @@ private static CertificateHandler createCertificateHandler(
private EccNodesSync getEccNodesSync(
final DistributedNativeConnectionProvider distributedNativeConnectionProvider
) throws UnknownHostException, EcChronosException, ConfigurationException {
Integer connectionDelay = config().getConnectionConfig().getCqlConnection().getAgentConnectionConfig().getConnectionDelay();
Integer connectionDelay = config().getConnectionConfig().getCqlConnection()
.getAgentConnectionConfig().getConnectionDelay();
EccNodesSync myEccNodesSync = EccNodesSync.newBuilder()
.withInitialNodesList(distributedNativeConnectionProvider.getNodes())
.withSession(distributedNativeConnectionProvider.getCqlSession())
.withEcchronosID(ecChronosID)
.withConnectionDelayInMinutes( connectionDelay )
.withConnectionDelayInMinutes(connectionDelay)
.build();
myEccNodesSync.acquireNodes();
LOG.info("Nodes acquired with success");
Expand Down

0 comments on commit 6665095

Please sign in to comment.