- java.lang.Object
-
- io.vertx.sqlclient.SqlConnectOptions
-
- io.vertx.oracleclient.OracleConnectOptions
-
public class OracleConnectOptions extends SqlConnectOptions
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DATABASEstatic StringDEFAULT_HOSTstatic StringDEFAULT_PASSWORDstatic intDEFAULT_PORTstatic booleanDEFAULT_SSLstatic StringDEFAULT_USER-
Fields inherited from class io.vertx.sqlclient.SqlConnectOptions
DEFAULT_CACHE_PREPARED_STATEMENTS, DEFAULT_METRICS_NAME, DEFAULT_PREPARED_STATEMENT_CACHE_FILTER, DEFAULT_PREPARED_STATEMENT_CACHE_MAX_SIZE, DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMIT, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL
-
-
Constructor Summary
Constructors Constructor Description OracleConnectOptions()OracleConnectOptions(JsonObject json)OracleConnectOptions(OracleConnectOptions other)OracleConnectOptions(SqlConnectOptions options)
-
Method Summary
-
Methods inherited from class io.vertx.sqlclient.SqlConnectOptions
getMetricsName, getReconnectAttempts, getReconnectInterval, getSslOptions, isUsingDomainSocket, setMetricsName, setReconnectAttempts, setReconnectInterval, setSslOptions
-
-
-
-
Field Detail
-
DEFAULT_HOST
public static final String DEFAULT_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
DEFAULT_USER
public static final String DEFAULT_USER
- See Also:
- Constant Field Values
-
DEFAULT_PASSWORD
public static final String DEFAULT_PASSWORD
- See Also:
- Constant Field Values
-
DEFAULT_DATABASE
public static final String DEFAULT_DATABASE
- See Also:
- Constant Field Values
-
DEFAULT_SSL
public static final boolean DEFAULT_SSL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OracleConnectOptions
public OracleConnectOptions()
-
OracleConnectOptions
public OracleConnectOptions(OracleConnectOptions other)
-
OracleConnectOptions
public OracleConnectOptions(SqlConnectOptions options)
-
OracleConnectOptions
public OracleConnectOptions(JsonObject json)
-
-
Method Detail
-
wrap
public static OracleConnectOptions wrap(SqlConnectOptions options)
- Returns:
- the
optionsas Oracle specific connect options
-
fromUri
public static OracleConnectOptions fromUri(String connectionUri) throws IllegalArgumentException
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
public String getServiceId()
- Returns:
- the Oracle service identifier (SID)
-
setServiceId
public OracleConnectOptions setServiceId(String serviceId)
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
public String getServiceName()
- Returns:
- the Oracle service name
-
setServiceName
public OracleConnectOptions setServiceName(String serviceName)
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
public ServerMode getServerMode()
- Returns:
- the server connection mode
-
setServerMode
public OracleConnectOptions setServerMode(ServerMode serverMode)
Set the server connection mode.- Parameters:
serverMode- the connection mode- Returns:
- a reference to this, so the API can be used fluently
-
getInstanceName
public String getInstanceName()
- Returns:
- the Oracle instance name
-
setInstanceName
public OracleConnectOptions setInstanceName(String instanceName)
Set the Oracle instance name.- Parameters:
instanceName- the instance name- Returns:
- a reference to this, so the API can be used fluently
-
getTnsAlias
public String getTnsAlias()
- Returns:
- name of the alias configured in the
tnsnames.orafile
-
setTnsAlias
public OracleConnectOptions setTnsAlias(String tnsAlias)
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
public String getTnsAdmin()
- Returns:
- the path of the directory that contains the
tnsnames.orafile
-
setTnsAdmin
public OracleConnectOptions setTnsAdmin(String tnsAdmin)
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
-
getHost
public String getHost()
- Overrides:
getHostin classSqlConnectOptions
-
setHost
public OracleConnectOptions setHost(String host)
- Overrides:
setHostin classSqlConnectOptions
-
getPort
public int getPort()
- Overrides:
getPortin classSqlConnectOptions
-
setPort
public OracleConnectOptions setPort(int port)
- Overrides:
setPortin classSqlConnectOptions
-
getUser
public String getUser()
- Overrides:
getUserin classSqlConnectOptions
-
setUser
public OracleConnectOptions setUser(String user)
- Overrides:
setUserin classSqlConnectOptions
-
getPassword
public String getPassword()
- Overrides:
getPasswordin classSqlConnectOptions
-
setPassword
public OracleConnectOptions setPassword(String password)
- Overrides:
setPasswordin classSqlConnectOptions
-
getDatabase
public String getDatabase()
- Overrides:
getDatabasein classSqlConnectOptions
-
setDatabase
public OracleConnectOptions setDatabase(String database)
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()
- Overrides:
getCachePreparedStatementsin classSqlConnectOptions
-
setCachePreparedStatements
public OracleConnectOptions setCachePreparedStatements(boolean cachePreparedStatements)
- Overrides:
setCachePreparedStatementsin classSqlConnectOptions
-
getPreparedStatementCacheMaxSize
public int getPreparedStatementCacheMaxSize()
- Overrides:
getPreparedStatementCacheMaxSizein classSqlConnectOptions
-
setPreparedStatementCacheMaxSize
public OracleConnectOptions setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
- Overrides:
setPreparedStatementCacheMaxSizein classSqlConnectOptions
-
getPreparedStatementCacheSqlFilter
public Predicate<String> getPreparedStatementCacheSqlFilter()
- Overrides:
getPreparedStatementCacheSqlFilterin classSqlConnectOptions
-
setPreparedStatementCacheSqlFilter
public OracleConnectOptions setPreparedStatementCacheSqlFilter(Predicate<String> predicate)
- Overrides:
setPreparedStatementCacheSqlFilterin classSqlConnectOptions
-
setPreparedStatementCacheSqlLimit
public OracleConnectOptions setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
- Overrides:
setPreparedStatementCacheSqlLimitin classSqlConnectOptions
-
getProperties
public Map<String,String> getProperties()
- Overrides:
getPropertiesin classSqlConnectOptions
-
setProperties
public OracleConnectOptions setProperties(Map<String,String> properties)
- Overrides:
setPropertiesin classSqlConnectOptions
-
addProperty
public OracleConnectOptions addProperty(String key, String value)
- Overrides:
addPropertyin classSqlConnectOptions
-
getSocketAddress
public SocketAddress getSocketAddress()
- Overrides:
getSocketAddressin classSqlConnectOptions
-
getTracingPolicy
public TracingPolicy getTracingPolicy()
- Overrides:
getTracingPolicyin classSqlConnectOptions
-
setTracingPolicy
public OracleConnectOptions setTracingPolicy(TracingPolicy tracingPolicy)
- Overrides:
setTracingPolicyin classSqlConnectOptions
-
isSsl
public boolean isSsl()
- Returns:
- is SSL/TLS enabled?
-
setSsl
public OracleConnectOptions setSsl(boolean ssl)
Set whether SSL/TLS is enabled- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
toJson
public JsonObject toJson()
- Overrides:
toJsonin classSqlConnectOptions
-
init
protected void init()
- Overrides:
initin classSqlConnectOptions
-
merge
public OracleConnectOptions merge(JsonObject other)
- Overrides:
mergein classSqlConnectOptions
-
-