Class H2URLParser
java.lang.Object
org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.AbstractURLParser
org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.H2URLParser
- All Implemented Interfaces:
ConnectionURLParser
H2URLParser presents that skywalking how to parse the connection url of H2 database.
H2URLParser check the connection url if contains "file" or "mem". if yes. the database name substring the
connection url from the index after "file" index or the "mem" index to the index of first charset ";".
-
Field Summary
Fields inherited from class org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.AbstractURLParser
url -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected URLLocationFetch the index range that database host and port from connection url.protected URLLocationFetch the index range that database name from connection url.parse()ConnectionURLParserparses database name and the database host(s) from connection url.Methods inherited from class org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.AbstractURLParser
fetchDatabaseHostsFromURL, fetchDatabaseNameFromURL, fetchDatabaseNameFromURL
-
Constructor Details
-
H2URLParser
-
-
Method Details
-
fetchDatabaseHostsIndexRange
Description copied from class:AbstractURLParserFetch the index range that database host and port from connection url.- Specified by:
fetchDatabaseHostsIndexRangein classAbstractURLParser- Returns:
- index range that database hosts.
-
fetchDatabaseNameIndexRange
Description copied from class:AbstractURLParserFetch the index range that database name from connection url.- Specified by:
fetchDatabaseNameIndexRangein classAbstractURLParser- Returns:
- index range that database name.
-
parse
Description copied from interface:ConnectionURLParserConnectionURLParserparses database name and the database host(s) from connection url.- Returns:
- connection info.
-