Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix javadoc #299

Merged
merged 3 commits into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -5362,11 +5362,11 @@ static public int getInitialDefaultServerPreparedStatementDiscardThreshold() {
}

/**
* Returns the default behavior for new connection instances. This setting controls how many outstanding prepared statement discard
* actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.
* If the setting is <= 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to >1 these calls will
* be batched together to avoid overhead of calling sp_unprepare too often.
* Initial setting for this option is available in INITIAL_DEFAULT_SERVER_PREPARED_STATEMENT_DISCARD_THRESHOLD.
* Returns the default behavior for new connection instances. This setting controls how many outstanding prepared statement discard actions
* (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed. If the setting is
* {@literal <=} 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to {@literal >} 1 these calls will be
* batched together to avoid overhead of calling sp_unprepare too often. Initial setting for this option is available in
* INITIAL_DEFAULT_SERVER_PREPARED_STATEMENT_DISCARD_THRESHOLD.
*
* @return Returns the current setting per the description.
*/
Expand All @@ -5378,25 +5378,25 @@ static public int getDefaultServerPreparedStatementDiscardThreshold() {
}

/**
* Specifies the default behavior for new connection instances. This setting controls how many outstanding prepared statement discard
* actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.
* If the setting is <= 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to >1 these calls will
* be batched together to avoid overhead of calling sp_unprepare too often.
* Initial setting for this option is available in INITIAL_DEFAULT_SERVER_PREPARED_STATEMENT_DISCARD_THRESHOLD.
* Specifies the default behavior for new connection instances. This setting controls how many outstanding prepared statement discard actions
* (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed. If the setting is
* {@literal <=} 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to {@literal >} 1 these calls will be
* batched together to avoid overhead of calling sp_unprepare too often. Initial setting for this option is available in
* INITIAL_DEFAULT_SERVER_PREPARED_STATEMENT_DISCARD_THRESHOLD.
*
* @param value
* Changes the setting per the description.
* Changes the setting per the description.
*/
static public void setDefaultServerPreparedStatementDiscardThreshold(int value) {
defaultServerPreparedStatementDiscardThreshold = value;
}

/**
* Returns the behavior for a specific connection instance. This setting controls how many outstanding prepared statement discard
* actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.
* If the setting is <= 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to >1 these calls will
* be batched together to avoid overhead of calling sp_unprepare too often.
* The default for this option can be changed by calling getDefaultServerPreparedStatementDiscardThreshold().
* Returns the behavior for a specific connection instance. This setting controls how many outstanding prepared statement discard actions
* (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed. If the setting is
* {@literal <=} 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to {@literal >} 1 these calls will be
* batched together to avoid overhead of calling sp_unprepare too often. The default for this option can be changed by calling
* getDefaultServerPreparedStatementDiscardThreshold().
*
* @return Returns the current setting per the description.
*/
Expand All @@ -5408,13 +5408,13 @@ public int getServerPreparedStatementDiscardThreshold() {
}

/**
* Specifies the behavior for a specific connection instance. This setting controls how many outstanding prepared statement discard
* actions (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed.
* If the setting is <= 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to >1 these calls will
* be batched together to avoid overhead of calling sp_unprepare too often.
* Specifies the behavior for a specific connection instance. This setting controls how many outstanding prepared statement discard actions
* (sp_unprepare) can be outstanding per connection before a call to clean-up the outstanding handles on the server is executed. If the setting is
* {@literal <=} 1 unprepare actions will be executed immedietely on prepared statement close. If it is set to {@literal >} 1 these calls will be
* batched together to avoid overhead of calling sp_unprepare too often.
*
* @param value
* Changes the setting per the description.
* Changes the setting per the description.
*/
public void setServerPreparedStatementDiscardThreshold(int value) {
this.serverPreparedStatementDiscardThreshold = value;
Expand Down
47 changes: 35 additions & 12 deletions src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public String getAuthentication() {
/**
* sets GSSCredential
*
* @param userCredential
* @param userCredential the credential
*/
public void setGSSCredentials(GSSCredential userCredential){
setObjectProperty(connectionProps,SQLServerDriverObjectProperty.GSS_CREDENTIAL.toString(), userCredential);
Expand Down Expand Up @@ -652,10 +652,21 @@ public int getPacketSize() {
SQLServerDriverIntProperty.PACKET_SIZE.getDefaultValue());
}

/**
* Setting the query timeout
*
* @param queryTimeout
* The number of seconds to wait before a timeout has occurred on a query. The default value is 0, which means infinite timeout.
*/
public void setQueryTimeout(int queryTimeout) {
setIntProperty(connectionProps, SQLServerDriverIntProperty.QUERY_TIMEOUT.toString(), queryTimeout);
}

/**
* Getting the query timeout
*
* @return The number of seconds to wait before a timeout has occurred on a query.
*/
public int getQueryTimeout() {
return getIntProperty(connectionProps, SQLServerDriverIntProperty.QUERY_TIMEOUT.toString(),
SQLServerDriverIntProperty.QUERY_TIMEOUT.getDefaultValue());
Expand Down Expand Up @@ -688,23 +699,23 @@ public boolean getEnablePrepareOnFirstPreparedStatementCall() {
}

/**
* This setting controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection
* before a call to clean-up the outstanding handles on the server is executed. If the setting is <= 1 unprepare actions will be
* executed immedietely on prepared statement close. If it is set to >1 these calls will be batched together to avoid overhead of
* calling sp_unprepare too often.
* This setting controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to
* clean-up the outstanding handles on the server is executed. If the setting is {@literal <=} 1 unprepare actions will be executed immedietely on
* prepared statement close. If it is set to {@literal >} 1 these calls will be batched together to avoid overhead of calling sp_unprepare too
* often.
*
* @param serverPreparedStatementDiscardThreshold
* Changes the setting per the description.
* Changes the setting per the description.
*/
public void setServerPreparedStatementDiscardThreshold(int serverPreparedStatementDiscardThreshold) {
setIntProperty(connectionProps, SQLServerDriverIntProperty.SERVER_PREPARED_STATEMENT_DISCARD_THRESHOLD.toString(), serverPreparedStatementDiscardThreshold);
}

/**
* This setting controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection
* before a call to clean-up the outstanding handles on the server is executed. If the setting is <= 1 unprepare actions will be
* executed immedietely on prepared statement close. If it is set to >1 these calls will be batched together to avoid overhead of
* calling sp_unprepare too often.
* This setting controls how many outstanding prepared statement discard actions (sp_unprepare) can be outstanding per connection before a call to
* clean-up the outstanding handles on the server is executed. If the setting is {@literal <=} 1 unprepare actions will be executed immedietely on
* prepared statement close. If it is set to {@literal >} 1 these calls will be batched together to avoid overhead of calling sp_unprepare too
* often.
*
* @return Returns the current setting per the description.
*/
Expand All @@ -713,10 +724,22 @@ public int getServerPreparedStatementDiscardThreshold() {
SQLServerConnection.getDefaultServerPreparedStatementDiscardThreshold());
}

/**
* Setting the socket timeout
*
* @param socketTimeout
* The number of milliseconds to wait before a timeout is occurred on a socket read or accept. The default value is 0, which means
* infinite timeout.
*/
public void setSocketTimeout(int socketTimeout) {
setIntProperty(connectionProps, SQLServerDriverIntProperty.SOCKET_TIMEOUT.toString(), socketTimeout);
}

/**
* Getting the socket timeout
*
* @return The number of milliseconds to wait before a timeout is occurred on a socket read or accept.
*/
public int getSocketTimeout() {
int defaultTimeOut = SQLServerDriverIntProperty.SOCKET_TIMEOUT.getDefaultValue();
return getIntProperty(connectionProps, SQLServerDriverIntProperty.SOCKET_TIMEOUT.toString(), defaultTimeOut);
Expand All @@ -726,7 +749,7 @@ public int getSocketTimeout() {
* Sets the login configuration file for Kerberos authentication. This
* overrides the default configuration <i> SQLJDBCDriver </i>
*
* @param configurationName
* @param configurationName the configuration name
*/
public void setJASSConfigurationName(String configurationName) {
setStringProperty(connectionProps, SQLServerDriverStringProperty.JAAS_CONFIG_NAME.toString(),
Expand All @@ -736,7 +759,7 @@ public void setJASSConfigurationName(String configurationName) {
/**
* Retrieves the login configuration file for Kerberos authentication.
*
* @return
* @return login configuration file name
*/
public String getJASSConfigurationName() {
return getStringProperty(connectionProps, SQLServerDriverStringProperty.JAAS_CONFIG_NAME.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public String toString() {
* @param serverName
* the host
* @throws IllegalArgumentException
* if priority < 0 or weight <= 1
* if priority {@literal <} 0 or weight {@literal <=} 1
*/
public DNSRecordSRV(int priority,
int weight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public class DNSUtilities {
/**
* Find all SRV Record using DNS.
*
* You can then use {@link DNSRecordsSRVCollection#getBestRecord()} to find the best candidate (for instance for Round-Robin calls)
*
* @param dnsSrvRecordToFind
* the DNS record, for instance: _ldap._tcp.dc._msdcs.DOMAIN.COM to find all LDAP servers in DOMAIN.COM
* @return the collection of records with facilities to find the best candidate
Expand Down