Source:
<code>ClientImpl(ClientConfig config) { m_distributer = new Distributer( config.m_heavyweight, config.m_procedureCallTimeoutNanos, config.m_connectionResponseTimeoutMS, config.m_useClientAffinity, config.m_sendReadsToReplicasBytDefaultIfCAEnabled, config.m_subject); m_distributer.addClientStatusListener(m_listener); String username = config.m_username; if (config.m_subject != null) { username = ClientConfig.getUserNameFromSubject(config.m_subject); } m_username = username; <START> m_distributer.setTopologyChangeAware((config.m_topologyChangeAware && config.m_useClientAffinity)); <END> if (config.m_reconnectOnConnectionLoss) { m_reconnectStatusListener = new ReconnectStatusListener(this, config.m_initialConnectionRetryIntervalMS, config.m_maxConnectionRetryIntervalMS); m_distributer.addClientStatusListener(m_reconnectStatusListener); } else { m_reconnectStatusListener = null; } m_hashScheme = config.m_hashScheme; if (config.m_cleartext) { m_passwordHash = ConnectionUtil.getHashedPassword(m_hashScheme, config.m_password); } else { m_passwordHash = Encoder.hexDecode(config.m_password); } if (config.m_listener != null) { m_distributer.addClientStatusListener(config.m_listener); m_clientStatusListener = config.m_listener; } assert(config.m_maxOutstandingTxns > 0); m_blessedThreadIds.addAll(m_distributer.getThreadIds()); if (config.m_autoTune) { m_distributer.m_rateLimiter.enableAutoTuning( config.m_autoTuneTargetInternalLatency); } else { m_distributer.m_rateLimiter.setLimits( config.m_maxTransactionsPerSecond, config.m_maxOutstandingTxns); } }</code><technical_language>warn client user config.m_topologyChangeAware is config.m_useClientAffinity is false</technical_language>

Target:
ClientImpl(ClientConfig config) { if (config.m_topologyChangeAware && !config.m_useClientAffinity) { throw new IllegalArgumentException("The client affinity must be enabled to enable topology awareness."); } m_distributer = new Distributer( config.m_heavyweight, config.m_procedureCallTimeoutNanos, config.m_connectionResponseTimeoutMS, config.m_useClientAffinity, config.m_sendReadsToReplicasBytDefaultIfCAEnabled, config.m_subject); m_distributer.addClientStatusListener(m_listener); String username = config.m_username; if (config.m_subject != null) { username = ClientConfig.getUserNameFromSubject(config.m_subject); } m_username = username; m_distributer.setTopologyChangeAware(config.m_topologyChangeAware); if (config.m_topologyChangeAware) { m_ex = Executors.newSingleThreadScheduledExecutor(CoreUtils.getThreadFactory("Topoaware thread")); } if (config.m_reconnectOnConnectionLoss) { m_reconnectStatusListener = new ReconnectStatusListener(this, config.m_initialConnectionRetryIntervalMS, config.m_maxConnectionRetryIntervalMS); m_distributer.addClientStatusListener(m_reconnectStatusListener); } else { m_reconnectStatusListener = null; } m_hashScheme = config.m_hashScheme; if (config.m_cleartext) { m_passwordHash = ConnectionUtil.getHashedPassword(m_hashScheme, config.m_password); } else { m_passwordHash = Encoder.hexDecode(config.m_password); } if (config.m_listener != null) { m_distributer.addClientStatusListener(config.m_listener); m_clientStatusListener = config.m_listener; } assert(config.m_maxOutstandingTxns > 0); m_blessedThreadIds.addAll(m_distributer.getThreadIds()); if (config.m_autoTune) { m_distributer.m_rateLimiter.enableAutoTuning( config.m_autoTuneTargetInternalLatency); } else { m_distributer.m_rateLimiter.setLimits( config.m_maxTransactionsPerSecond, config.m_maxOutstandingTxns); } }