internal static MemberAttributeConfig BuildMemberAttributesForCore(MemberId myself, Config config) { MemberAttributeConfig memberAttributeConfig = new MemberAttributeConfig(); memberAttributeConfig.setStringAttribute(MEMBER_UUID, myself.Uuid.ToString()); AdvertisedSocketAddress discoveryAddress = config.Get(CausalClusteringSettings.discovery_advertised_address); memberAttributeConfig.setStringAttribute(DISCOVERY_SERVER, discoveryAddress.ToString()); AdvertisedSocketAddress transactionSource = config.Get(CausalClusteringSettings.transaction_advertised_address); memberAttributeConfig.setStringAttribute(TRANSACTION_SERVER, transactionSource.ToString()); AdvertisedSocketAddress raftAddress = config.Get(CausalClusteringSettings.raft_advertised_address); memberAttributeConfig.setStringAttribute(RAFT_SERVER, raftAddress.ToString()); ClientConnectorAddresses clientConnectorAddresses = ClientConnectorAddresses.ExtractFromConfig(config); memberAttributeConfig.setStringAttribute(CLIENT_CONNECTOR_ADDRESSES, clientConnectorAddresses.ToString()); memberAttributeConfig.setBooleanAttribute(REFUSE_TO_BE_LEADER_KEY, config.Get(refuse_to_be_leader)); memberAttributeConfig.setStringAttribute(MEMBER_DB_NAME, config.Get(CausalClusteringSettings.database)); return(memberAttributeConfig); }
internal SharedDiscoveryReadReplicaClient(SharedDiscoveryService sharedDiscoveryService, Config config, MemberId memberId, LogProvider logProvider) { this._sharedDiscoveryService = sharedDiscoveryService; this._dbName = config.Get(CausalClusteringSettings.database); //JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter: this._addresses = new ReadReplicaInfo(ClientConnectorAddresses.ExtractFromConfig(config), socketAddress(config.Get(CausalClusteringSettings.transaction_advertised_address).ToString(), AdvertisedSocketAddress::new), _dbName); this._memberId = memberId; this._log = logProvider.getLog(this.GetType()); }
public static ReadReplicaInfo From(Config config) { AdvertisedSocketAddress transactionSource = config.Get(CausalClusteringSettings.transaction_advertised_address); ClientConnectorAddresses clientConnectorAddresses = ClientConnectorAddresses.ExtractFromConfig(config); string dbName = config.Get(CausalClusteringSettings.database); IList <string> groupList = config.Get(CausalClusteringSettings.server_groups); ISet <string> groups = new HashSet <string>(groupList); return(new ReadReplicaInfo(clientConnectorAddresses, transactionSource, groups, dbName)); }
public static CoreServerInfo From(Config config) { AdvertisedSocketAddress raftAddress = config.Get(CausalClusteringSettings.raft_advertised_address); AdvertisedSocketAddress transactionSource = config.Get(CausalClusteringSettings.transaction_advertised_address); ClientConnectorAddresses clientConnectorAddresses = ClientConnectorAddresses.ExtractFromConfig(config); string dbName = config.Get(CausalClusteringSettings.database); IList <string> groupList = config.Get(CausalClusteringSettings.server_groups); ISet <string> groups = new HashSet <string>(groupList); bool refuseToBeLeader = config.Get(CausalClusteringSettings.refuse_to_be_leader); return(new CoreServerInfo(raftAddress, transactionSource, clientConnectorAddresses, groups, dbName, refuseToBeLeader)); }
public HazelcastClient(HazelcastConnector connector, JobScheduler scheduler, LogProvider logProvider, Config config, MemberId myself) { this._hzInstance = new RobustHazelcastWrapper(connector); this._config = config; this._log = logProvider.getLog(this.GetType()); this._scheduler = new RobustJobSchedulerWrapper(scheduler, _log); this._connectorAddresses = ClientConnectorAddresses.ExtractFromConfig(config); this._transactionSource = config.Get(CausalClusteringSettings.transaction_advertised_address); this._timeToLive = config.Get(CausalClusteringSettings.read_replica_time_to_live).toMillis(); this._refreshPeriod = config.Get(CausalClusteringSettings.cluster_topology_refresh).toMillis(); this._myself = myself; this._groups = config.Get(CausalClusteringSettings.server_groups); this._topologyServiceRetryStrategy = ResolveStrategy(_refreshPeriod, logProvider); this._dbName = config.Get(CausalClusteringSettings.database); this._coreRoles = emptyMap(); }
public override ClientConnectorAddresses ClientConnectorAddresses() { return(ClientConnectorAddresses.ExtractFromConfig(_memberConfig)); }
private void LogConnectionInfo(ICollection <string> initialMembers) { UserLog.info("My connection info: " + "[\n\tDiscovery: listen=%s, advertised=%s," + "\n\tTransaction: listen=%s, advertised=%s, " + "\n\tRaft: listen=%s, advertised=%s, " + "\n\tClient Connector Addresses: %s" + "\n]", Config.get(discovery_listen_address), Config.get(CausalClusteringSettings.discovery_advertised_address), Config.get(CausalClusteringSettings.transaction_listen_address), Config.get(CausalClusteringSettings.transaction_advertised_address), Config.get(CausalClusteringSettings.raft_listen_address), Config.get(CausalClusteringSettings.raft_advertised_address), ClientConnectorAddresses.ExtractFromConfig(Config)); UserLog.info("Discovering other core members in initial members set: " + initialMembers); }