Class OracleConnectOptions
java.lang.Object
io.vertx.sqlclient.SqlConnectOptions
io.vertx.oracleclient.OracleConnectOptions
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String key, String value) Add a property for this client, which will be sent to server at the connection start.static OracleConnectOptionsProvide aOracleConnectOptionsconfigured from a connection URI.booleanGet whether prepared statements cache is enabled.Get the default database name for the connection.intgetHost()Get the host for connecting to the server.intGet the user password to be used for the authentication.intgetPort()Get the port for connecting to the server.intGet the maximum number of prepared statements that the connection will cache.Get the predicate filtering prepared statements that the connection will cache.intgetUser()Get the user account to be used for the authentication.protected voidinit()Initialize with the default options.booleanisSsl()merge(JsonObject other) Returns new options created after this object and merged with theotherjson config.setCachePreparedStatements(boolean cachePreparedStatements) Set whether prepared statements cache should be enabled.setDatabase(String database) Set the database name.setFetchDirection(FetchDirection fetchDirection) setFetchSize(int fetchSize) Specify the host for connecting to the server.setInstanceName(String instanceName) Set the Oracle instance name.setMaxRows(int maxRows) setPassword(String password) Specify the user password to be used for the authentication.setPort(int port) Specify the port for connecting to the server.setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize) Set the maximum number of prepared statements that the connection will cache.setPreparedStatementCacheSqlFilter(Predicate<String> predicate) Set a predicate filtering prepared statements that the connection will cache.setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit) Set the maximum length of prepared statement SQL string that the connection will cache.setProperties(Map<String, String> properties) Set properties for this client, which will be sent to server at the connection start.setQueryTimeout(int queryTimeout) setServerMode(ServerMode serverMode) Set the server connection mode.setServiceId(String serviceId) Set the Oracle service identifier (SID).setServiceName(String serviceName) Set the Oracle service name.setSsl(boolean ssl) Set whether SSL/TLS is enabledsetTnsAdmin(String tnsAdmin) Set the path of the directory that contains thetnsnames.orafile.setTnsAlias(String tnsAlias) Set the name of an alias configured in thetnsnames.orafile.setTracingPolicy(TracingPolicy tracingPolicy) Set the tracing policy for the client behavior when Vert.x has tracing enabled.Specify the user account to be used for the authentication.toJson()static OracleConnectOptionswrap(SqlConnectOptions options) Methods inherited from class SqlConnectOptions
getMetricsName, getReconnectAttempts, getReconnectInterval, getSslOptions, isUsingDomainSocket, setMetricsName, setReconnectAttempts, setReconnectInterval, setSslOptions
-
Field Details
-
DEFAULT_HOST
- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_USER
- See Also:
-
DEFAULT_PASSWORD
- See Also:
-
DEFAULT_DATABASE
- See Also:
-
DEFAULT_SSL
public static final boolean DEFAULT_SSL- See Also:
-
-
Constructor Details
-
OracleConnectOptions
public OracleConnectOptions() -
OracleConnectOptions
-
OracleConnectOptions
-
OracleConnectOptions
-
-
Method Details
-
wrap
- Returns:
- the
optionsas Oracle specific connect options
-
fromUri
Provide aOracleConnectOptionsconfigured from a connection URI.- Parameters:
connectionUri- the connection URI to configure from- Returns:
- a
OracleConnectOptionsparsed from the connection URI - Throws:
IllegalArgumentException- when theconnectionUriis in an invalid format
-
getServiceId
- Returns:
- the Oracle service identifier (SID)
-
setServiceId
Set the Oracle service identifier (SID). If set, the client will build an Oracle connection URL using SID instead of the EZConnect format.- Parameters:
serviceId- the service identifier- Returns:
- a reference to this, so the API can be used fluently
-
getServiceName
- Returns:
- the Oracle service name
-
setServiceName
Set the Oracle service name. If set, the client will build an Oracle connection URL in the EZConnect format.- Parameters:
serviceName- the Oracle service name- Returns:
- a reference to this, so the API can be used fluently
-
getServerMode
- Returns:
- the server connection mode
-
setServerMode
Set the server connection mode.- Parameters:
serverMode- the connection mode- Returns:
- a reference to this, so the API can be used fluently
-
getInstanceName
- Returns:
- the Oracle instance name
-
setInstanceName
Set the Oracle instance name.- Parameters:
instanceName- the instance name- Returns:
- a reference to this, so the API can be used fluently
-
getTnsAlias
- Returns:
- name of the alias configured in the
tnsnames.orafile
-
setTnsAlias
Set the name of an alias configured in thetnsnames.orafile.- Parameters:
tnsAlias- the instance name- Returns:
- a reference to this, so the API can be used fluently
-
getTnsAdmin
- Returns:
- the path of the directory that contains the
tnsnames.orafile
-
setTnsAdmin
Set the path of the directory that contains thetnsnames.orafile.- Parameters:
tnsAdmin- path of the directory- Returns:
- a reference to this, so the API can be used fluently
-
getQueryTimeout
public int getQueryTimeout() -
setQueryTimeout
- See Also:
-
getMaxRows
public int getMaxRows() -
setMaxRows
- See Also:
-
getFetchDirection
-
setFetchDirection
- See Also:
-
getFetchSize
public int getFetchSize() -
setFetchSize
- See Also:
-
getHost
Description copied from class:SqlConnectOptionsGet the host for connecting to the server.- Overrides:
getHostin classSqlConnectOptions- Returns:
- the host
-
setHost
Description copied from class:SqlConnectOptionsSpecify the host for connecting to the server.- Overrides:
setHostin classSqlConnectOptions- Parameters:
host- the host to specify- Returns:
- a reference to this, so the API can be used fluently
-
getPort
public int getPort()Description copied from class:SqlConnectOptionsGet the port for connecting to the server.- Overrides:
getPortin classSqlConnectOptions- Returns:
- the port
-
setPort
Description copied from class:SqlConnectOptionsSpecify the port for connecting to the server.- Overrides:
setPortin classSqlConnectOptions- Parameters:
port- the port to specify- Returns:
- a reference to this, so the API can be used fluently
-
getUser
Description copied from class:SqlConnectOptionsGet the user account to be used for the authentication.- Overrides:
getUserin classSqlConnectOptions- Returns:
- the user
-
setUser
Description copied from class:SqlConnectOptionsSpecify the user account to be used for the authentication.- Overrides:
setUserin classSqlConnectOptions- Parameters:
user- the user to specify- Returns:
- a reference to this, so the API can be used fluently
-
getPassword
Description copied from class:SqlConnectOptionsGet the user password to be used for the authentication.- Overrides:
getPasswordin classSqlConnectOptions- Returns:
- the password
-
setPassword
Description copied from class:SqlConnectOptionsSpecify the user password to be used for the authentication.- Overrides:
setPasswordin classSqlConnectOptions- Parameters:
password- the password to specify- Returns:
- a reference to this, so the API can be used fluently
-
getDatabase
Description copied from class:SqlConnectOptionsGet the default database name for the connection.- Overrides:
getDatabasein classSqlConnectOptions- Returns:
- the database name
-
setDatabase
Set the database name. If set, the client will build an Oracle connection URL in the EZConnect format using thedatabasevalue as service name.- Overrides:
setDatabasein classSqlConnectOptions- Parameters:
database- the database name to specify- Returns:
- a reference to this, so the API can be used fluently
-
getCachePreparedStatements
public boolean getCachePreparedStatements()Description copied from class:SqlConnectOptionsGet whether prepared statements cache is enabled.- Overrides:
getCachePreparedStatementsin classSqlConnectOptions- Returns:
- the value
-
setCachePreparedStatements
Description copied from class:SqlConnectOptionsSet whether prepared statements cache should be enabled.- Overrides:
setCachePreparedStatementsin classSqlConnectOptions- Parameters:
cachePreparedStatements- true if cache should be enabled- Returns:
- a reference to this, so the API can be used fluently
-
getPreparedStatementCacheMaxSize
public int getPreparedStatementCacheMaxSize()Description copied from class:SqlConnectOptionsGet the maximum number of prepared statements that the connection will cache.- Overrides:
getPreparedStatementCacheMaxSizein classSqlConnectOptions- Returns:
- the size
-
setPreparedStatementCacheMaxSize
Description copied from class:SqlConnectOptionsSet the maximum number of prepared statements that the connection will cache.- Overrides:
setPreparedStatementCacheMaxSizein classSqlConnectOptions- Parameters:
preparedStatementCacheMaxSize- the size to set- Returns:
- a reference to this, so the API can be used fluently
-
getPreparedStatementCacheSqlFilter
Description copied from class:SqlConnectOptionsGet the predicate filtering prepared statements that the connection will cache.- Overrides:
getPreparedStatementCacheSqlFilterin classSqlConnectOptions- Returns:
- the current predicate
-
setPreparedStatementCacheSqlFilter
Description copied from class:SqlConnectOptionsSet a predicate filtering prepared statements that the connection will cache.The default predicate accepts predicate having query length invalid input: '<'
SqlConnectOptions.DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMIT- Overrides:
setPreparedStatementCacheSqlFilterin classSqlConnectOptions- Parameters:
predicate- the filter
-
setPreparedStatementCacheSqlLimit
Description copied from class:SqlConnectOptionsSet the maximum length of prepared statement SQL string that the connection will cache.This is an helper setting the
SqlConnectOptions.setPreparedStatementCacheSqlFilter(Predicate).- Overrides:
setPreparedStatementCacheSqlLimitin classSqlConnectOptions- Parameters:
preparedStatementCacheSqlLimit- the maximum length limit of SQL string to set- Returns:
- a reference to this, so the API can be used fluently
-
getProperties
- Overrides:
getPropertiesin classSqlConnectOptions- Returns:
- the value of current connection properties
-
setProperties
Description copied from class:SqlConnectOptionsSet properties for this client, which will be sent to server at the connection start.- Overrides:
setPropertiesin classSqlConnectOptions- Parameters:
properties- the value of properties to specify- Returns:
- a reference to this, so the API can be used fluently
-
addProperty
Description copied from class:SqlConnectOptionsAdd a property for this client, which will be sent to server at the connection start.- Overrides:
addPropertyin classSqlConnectOptions- Parameters:
key- the value of property keyvalue- the value of property value- Returns:
- a reference to this, so the API can be used fluently
-
getSocketAddress
- Overrides:
getSocketAddressin classSqlConnectOptions
-
getTracingPolicy
- Overrides:
getTracingPolicyin classSqlConnectOptions- Returns:
- the tracing policy
-
setTracingPolicy
Description copied from class:SqlConnectOptionsSet the tracing policy for the client behavior when Vert.x has tracing enabled.- Overrides:
setTracingPolicyin classSqlConnectOptions- Parameters:
tracingPolicy- the tracing policy- Returns:
- a reference to this, so the API can be used fluently
-
isSsl
public boolean isSsl()- Returns:
- is SSL/TLS enabled?
-
setSsl
Set whether SSL/TLS is enabled- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
toJson
- Overrides:
toJsonin classSqlConnectOptions
-
init
protected void init()Description copied from class:SqlConnectOptionsInitialize with the default options.- Overrides:
initin classSqlConnectOptions
-
merge
Description copied from class:SqlConnectOptionsReturns new options created after this object and merged with theotherjson config.- Overrides:
mergein classSqlConnectOptions- Parameters:
other- the other JSON object- Returns:
- new options created after this object and merged with the
otherjson config
-