/// <summary> /// 创建数据库元数据信息 /// </summary> /// <param name="dataSourceMap"></param> /// <param name="databaseType"></param> /// <returns></returns> private ShardingConnectorMetaData CreateMetaData(IDictionary <string, IDataSource> dataSourceMap, IDatabaseType databaseType) { long start = UtcTime.CurrentTimeMillis(); DataSourceMetas dataSourceMetas = new DataSourceMetas(databaseType, GetDatabaseAccessConfigurationMap(dataSourceMap)); SchemaMetaData schemaMetaData = LoadSchemaMetaData(dataSourceMap); ShardingConnectorMetaData result = new ShardingConnectorMetaData(dataSourceMetas, schemaMetaData); var costMillis = UtcTime.CurrentTimeMillis() - start; _logger.LogInformation($"Meta data load finished, cost {costMillis} milliseconds."); return(result); }
public ShardingMasterInstanceBroadcastRoutingEngine(DataSourceMetas dataSourceMetas) { this._dataSourceMetas = dataSourceMetas; }
public ShardingConnectorMetaData(DataSourceMetas dataSources, SchemaMetaData schema) { DataSources = dataSources; Schema = schema; }