use of com.navercorp.pinpoint.bootstrap.plugin.jdbc.JdbcUrlParserV2 in project pinpoint by naver.
the class DefaultJdbcUrlParsingService method parseJdbcUrl.
@Override
public DatabaseInfo parseJdbcUrl(ServiceType serviceType, String jdbcUrl) {
if (jdbcUrl == null) {
return UnKnownDatabaseInfo.INSTANCE;
}
CacheKey cacheKey = new CacheKey(serviceType, jdbcUrl);
DatabaseInfo cacheValue = eachServiceTypeCache.get(cacheKey);
if (cacheValue != null) {
return cacheValue;
}
for (JdbcUrlParserV2 parser : jdbcUrlParserList) {
if (serviceType == parser.getServiceType()) {
DatabaseInfo databaseInfo = parser.parse(jdbcUrl);
return putCacheIfAbsent(cacheKey, databaseInfo);
}
}
return putCacheIfAbsent(cacheKey, UnKnownDatabaseInfo.createUnknownDataBase(jdbcUrl));
}
use of com.navercorp.pinpoint.bootstrap.plugin.jdbc.JdbcUrlParserV2 in project pinpoint by naver.
the class JdbcUrlParsingServiceProvider method get.
@Override
public JdbcUrlParsingService get() {
PluginContextLoadResult pluginContextLoadResult = this.pluginContextLoadResultProvider.get();
List<JdbcUrlParserV2> jdbcUrlParserList = pluginContextLoadResult.getJdbcUrlParserList();
return new DefaultJdbcUrlParsingService(jdbcUrlParserList);
}
Aggregations