|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.cluster.resource.RouterURL
public class RouterURL
Implements a simple parser for SQLRouter URLs. It identifies and strips out t-router properties
| Field Summary | |
|---|---|
static java.lang.String |
DBNAME_TOKEN
Special tag to be replaced by a database name dynamically |
static java.lang.String |
KEY_AFFINITY
|
static java.lang.String |
KEY_MAX_APPLIED_LATENCY
|
static java.lang.String |
KEY_PASSWORD
|
static java.lang.String |
KEY_QOS
|
static java.lang.String |
KEY_SESSION_ID
|
static java.lang.String |
KEY_USER
|
static double |
MAX_APPLIED_LATENCY_UNDEF
|
static java.lang.String |
SESSIONID_CONNECTION
|
static java.lang.String |
SESSIONID_DATABASE
|
static java.lang.String |
SESSIONID_PROVIDED_IN_DBNAME
|
static java.lang.String |
SESSIONID_USER
|
static java.lang.String |
URL_FULL_HEADER
|
| Constructor Summary | |
|---|---|
RouterURL(java.lang.String url,
java.util.Properties info)
Creates a parsed URL object. Valid driver URLs are: jdbc:t-router://service/ The default qos (Quality of service) is RW_STRICT unless specified or unless overridden by the service configuration. Properties passed via the URL supersede the ones in the properties. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAffinity()
|
java.lang.String |
getDataServiceName()
Returns the dataServiceName value. |
java.lang.String |
getDbname()
|
double |
getMaxAppliedLatency()
|
java.util.Properties |
getObfuscatedPasswordPropsCopy()
|
java.lang.String |
getProperty(java.lang.String key)
Provides the property with the given key from the parsed and passed URL props. |
java.util.Properties |
getProps()
|
QualityOfService |
getQos()
|
java.lang.String |
getService()
|
java.lang.String |
getSessionId()
|
boolean |
isAutoSession()
|
void |
parseURLOptions(java.lang.String substring)
|
void |
setAffinity(java.lang.String affinityParam)
|
void |
setDbname(java.lang.String dbname)
Changes the database name. |
void |
setMaxAppliedLatency(double maxAppliedLatencyPrm)
|
void |
setProperties(java.lang.String propsStr)
|
void |
setQoS(QualityOfService qosParam)
|
void |
setSessionId(java.lang.String newSessionId)
Upon catalog change, it can be required to change the session ID |
java.lang.String |
toString()
|
void |
transferPropertiesToRouterURLMemberVariables(java.util.Properties propsArg)
|
protected void |
transferRouterPropertiesToMemberVariables()
Iterates through all properties and removes the ones that are router- specific. |
static void |
urlOptionsToProperties(java.lang.String urlOptions,
java.util.Properties p)
Given a string of URL options (eg. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String URL_FULL_HEADER
public static final java.lang.String KEY_MAX_APPLIED_LATENCY
public static final java.lang.String KEY_QOS
public static final java.lang.String KEY_SESSION_ID
public static final java.lang.String KEY_AFFINITY
public static final java.lang.String KEY_USER
public static final java.lang.String KEY_PASSWORD
public static final java.lang.String SESSIONID_CONNECTION
public static final java.lang.String SESSIONID_DATABASE
public static final java.lang.String SESSIONID_USER
public static final java.lang.String SESSIONID_PROVIDED_IN_DBNAME
public static final java.lang.String DBNAME_TOKEN
public static double MAX_APPLIED_LATENCY_UNDEF
| Constructor Detail |
|---|
public RouterURL(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
url - SQL router URLinfo - Properties for URL
java.sql.SQLException - if the URL cannot be parsed or misses the data
service name or database name| Method Detail |
|---|
public void parseURLOptions(java.lang.String substring)
throws java.sql.SQLException
java.sql.SQLException
public static void urlOptionsToProperties(java.lang.String urlOptions,
java.util.Properties p)
throws java.sql.SQLException
urlOptions - string to parsep - output properties to which options will be added, overwriting
them if already in
java.sql.SQLException - in case of parsing error
protected void transferRouterPropertiesToMemberVariables()
throws java.sql.SQLException
java.sql.SQLException - upon illegal values
public void transferPropertiesToRouterURLMemberVariables(java.util.Properties propsArg)
throws java.sql.SQLException
java.sql.SQLException
public void setProperties(java.lang.String propsStr)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getDataServiceName()
public void setDbname(java.lang.String dbname)
dbname - The dbname to set.public double getMaxAppliedLatency()
public void setMaxAppliedLatency(double maxAppliedLatencyPrm)
public void setSessionId(java.lang.String newSessionId)
newSessionId - public java.lang.String getSessionId()
public java.lang.String getService()
public java.lang.String getDbname()
public java.util.Properties getProps()
public QualityOfService getQos()
public void setQoS(QualityOfService qosParam)
public java.lang.String getAffinity()
public void setAffinity(java.lang.String affinityParam)
public java.lang.String getProperty(java.lang.String key)
key - the property key to retrieve
public java.util.Properties getObfuscatedPasswordPropsCopy()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isAutoSession()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||