public class JDBCUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
findProperty(String url,
Properties info,
String propName)
Find the propName by first looking in the url string and if not found,
next in the info properties.
|
static Map<String,String> |
getAnnotations(String url,
Properties info) |
static boolean |
getAutoCommit(String url,
Properties info,
boolean defaultValue)
Retrieve the value of the optional auto-commit setting from JDBC url or connection
properties.
|
static Long |
getCurrentSCN(String url,
Properties info) |
static int |
getMutateBatchSize(String url,
Properties info,
ReadOnlyProps props) |
static PName |
getTenantId(String url,
Properties info) |
static boolean |
isCollectingRequestLevelMetricsEnabled(String url,
Properties overrideProps,
ReadOnlyProps queryServicesProps) |
static String |
removeProperty(String url,
String propName) |
public static String findProperty(String url, Properties info, String propName)
url
- JDBC connection URLinfo
- JDBC connection propertiespropName
- the name of the property to findpublic static Map<String,String> getAnnotations(@NotNull String url, @NotNull Properties info)
public static Long getCurrentSCN(String url, Properties info) throws SQLException
SQLException
public static int getMutateBatchSize(String url, Properties info, ReadOnlyProps props) throws SQLException
SQLException
@Nullable public static PName getTenantId(String url, Properties info) throws SQLException
SQLException
public static boolean getAutoCommit(String url, Properties info, boolean defaultValue)
url
- JDBC url used for connecting to Phoenixinfo
- connection propertiesdefaultValue
- default to return if the auto-commit property is not set in the url
or connection propertiespublic static boolean isCollectingRequestLevelMetricsEnabled(String url, Properties overrideProps, ReadOnlyProps queryServicesProps) throws SQLException
SQLException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.