public final class LogicSchemas extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static LogicSchemas |
getInstance()
Get instance of logic schemas.
|
LogicSchema |
getLogicSchema(String schemaName)
Get logic schema.
|
List<String> |
getSchemaNames()
Get schema names.
|
void |
init(Collection<String> localSchemaNames,
Map<String,Map<String,YamlDataSourceParameter>> schemaDataSources,
Map<String,org.apache.shardingsphere.api.config.RuleConfiguration> schemaRules,
boolean isUsingRegistry)
Initialize proxy context.
|
void |
init(Map<String,Map<String,YamlDataSourceParameter>> schemaDataSources,
Map<String,org.apache.shardingsphere.api.config.RuleConfiguration> schemaRules)
Initialize proxy context.
|
void |
renew(org.apache.shardingsphere.orchestration.internal.registry.config.event.SchemaAddedEvent schemaAddedEvent)
Renew to add new schema.
|
void |
renew(org.apache.shardingsphere.orchestration.internal.registry.config.event.SchemaDeletedEvent schemaDeletedEvent)
Renew to delete new schema.
|
boolean |
schemaExists(String schema)
Check schema exists.
|
public static LogicSchemas getInstance()
public void init(Map<String,Map<String,YamlDataSourceParameter>> schemaDataSources, Map<String,org.apache.shardingsphere.api.config.RuleConfiguration> schemaRules) throws SQLException
schemaDataSources - data source mapschemaRules - schema rule mapSQLException - SQL exceptionpublic void init(Collection<String> localSchemaNames, Map<String,Map<String,YamlDataSourceParameter>> schemaDataSources, Map<String,org.apache.shardingsphere.api.config.RuleConfiguration> schemaRules, boolean isUsingRegistry) throws SQLException
localSchemaNames - local schema namesschemaDataSources - data source mapschemaRules - schema rule mapisUsingRegistry - is using registry or notSQLException - SQL exceptionpublic boolean schemaExists(String schema)
schema - schemapublic LogicSchema getLogicSchema(String schemaName)
schemaName - schema namepublic void renew(org.apache.shardingsphere.orchestration.internal.registry.config.event.SchemaAddedEvent schemaAddedEvent)
throws SQLException
schemaAddedEvent - schema add changed eventSQLException - SQL exceptionpublic void renew(org.apache.shardingsphere.orchestration.internal.registry.config.event.SchemaDeletedEvent schemaDeletedEvent)
schemaDeletedEvent - schema delete changed eventCopyright © 2019 The Apache Software Foundation. All rights reserved.