public abstract class AbstractTableMetaCache extends Object implements TableMetaCache
| 构造器和说明 |
|---|
AbstractTableMetaCache() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract TableMeta |
fetchSchema(Connection connection,
String tableName)
get scheme from datasource and tableName
|
protected abstract String |
getCacheKey(Connection connection,
String tableName,
String resourceId)
generate cache key
|
TableMeta |
getTableMeta(Connection connection,
String tableName,
String resourceId)
Gets table meta.
|
void |
refresh(Connection connection,
String resourceId)
Clear the table meta cache
|
public TableMeta getTableMeta(Connection connection, String tableName, String resourceId)
TableMetaCachegetTableMeta 在接口中 TableMetaCacheconnection - the connectiontableName - the table nameresourceId - the resource idpublic void refresh(Connection connection, String resourceId)
TableMetaCacherefresh 在接口中 TableMetaCacheconnection - the connectionresourceId - the resource idprotected abstract String getCacheKey(Connection connection, String tableName, String resourceId)
connection - the connectiontableName - the table nameresourceId - the resource idprotected abstract TableMeta fetchSchema(Connection connection, String tableName) throws SQLException
connection - the connectiontableName - the table nameSQLException - the sql exceptionCopyright © 2022 Seata. All rights reserved.