/// <summary> /// Caches the topology so that the lookups are fast. /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void refreshTopology() throws HazelcastInstanceNotActiveException private void RefreshTopology() { CoreTopology newCoreTopology = _hzInstance.apply(hz => getCoreTopology(hz, _config, _log)); _coreTopology = newCoreTopology; _localCoreTopology = newCoreTopology.FilterTopologyByDb(_dbName); ReadReplicaTopology newReadReplicaTopology = _hzInstance.apply(hz => getReadReplicaTopology(hz, _log)); _readReplicaTopology = newReadReplicaTopology; _localReadReplicaTopology = newReadReplicaTopology.FilterTopologyByDb(_dbName); _catchupAddressMap = extractCatchupAddressesMap(LocalCoreServers(), LocalReadReplicas()); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void refreshReadReplicaTopology() throws InterruptedException private void RefreshReadReplicaTopology() { WaitOnHazelcastInstanceCreation(); ReadReplicaTopology newReadReplicaTopology = getReadReplicaTopology(_hazelcastInstance, Log); TopologyDifference difference = _readReplicaTopology.difference(newReadReplicaTopology); this._readReplicaTopology = newReadReplicaTopology; this._localReadReplicaTopology = newReadReplicaTopology.FilterTopologyByDb(_localDBName); if (difference.HasChanges()) { Log.info("Read replica topology changed %s", difference); } }
internal virtual void OnReadReplicaTopologyChange(ReadReplicaTopology readReplicaTopology) { Log.info("Notified of read replica topology change " + readReplicaTopology); this._readReplicaTopology = readReplicaTopology; this._localReadReplicaTopology = readReplicaTopology.FilterTopologyByDb(_localDBName); }