public class DataSource
extends com.vertica.jdbc.hybrid.HybridAbstractDataSource
implements javax.sql.DataSource
Constructor and Description |
---|
DataSource() |
Modifier and Type | Method and Description |
---|---|
boolean |
areBatchInsertsDirect()
Get if batch inserts are direct for the data source.
|
java.lang.String |
getBackupServerNode()
Get list of backup server nodes.
|
boolean |
getBinaryTransfer()
Get whether or not connection uses binary transfer
|
java.lang.String |
getConnSettings()
Returns the session initialization sql that will run when a connection is established.
|
java.lang.String |
getDatabase()
Get the database for the data source.
|
boolean |
getDisableCopyLocal()
Gets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
|
boolean |
getEnableRoutableQueries()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
boolean |
getFailOnMultiNodePlans()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
java.lang.String |
getHost()
Get the host for the data source.
|
java.lang.String |
getHostNameVerifier()
Get if TLS Mode for the data source.
|
java.lang.String |
getJAASConfigName()
Gets the name of the JAAS configuration entry that will the driver will use when performing GSS authentication.
|
java.lang.String |
getKerberosHostName()
Gets the host name portion of the kerberos service principal that identifies the Vertica server.
|
java.lang.String |
getKerberosServiceName()
Gets the service name portion of the kerberos service principal that identifies the Vertica server.
|
java.lang.String |
getKeyStorePassword()
Gets the password for the keystore file.
|
java.lang.String |
getKeyStorePath()
Gets the path to the keystore file, or "" if not specified.
|
java.lang.String |
getLocale()
Get the locale for the data source.
|
java.lang.String |
getLogDirectory()
Gets the directory used to store log files
|
int |
getLoginNetworkTimeout()
Get the LoginNetworkTimeout for the data source.
|
int |
getLoginNodeTimeout()
Get the LoginNodeTimeout for the data source.
|
int |
getLoginTimeout()
Get the login timeout for the data source.
|
com.vertica.support.LogLevel |
getLogLevel()
Gets current level of logging
|
java.lang.String |
getLogNameSpace()
Gets package that logging is restricted to
|
boolean |
getMarsEnabled() |
int |
getMaxPooledConnections()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
int |
getMaxPooledConnectionsPerNode()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
int |
getMaxPooledConnectionUses()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
int |
getMetadataCacheLifetime()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
int |
getNetworkTimeout()
Gets the current network timeout value.
|
int |
getNodeDownWaitTime()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
java.lang.String |
getOAuthAccessToken()
Gets the access token used for OAuth authentication.
|
boolean |
getOAuthBackwardCompatibility() |
java.lang.String |
getOAuthClientId()
Gets the client ID used for OAuth authentication.
|
java.lang.String |
getOAuthClientSecret()
Gets the client secret used for OAuth authentication.
|
java.lang.String |
getOAuthDiscoveryUrl()
Gets the discovery url used to fetch the OAuth token endpoint.
|
java.lang.String |
getOAuthRefreshToken()
Gets the refresh token used for OAuth authentication.
|
java.lang.String |
getOAuthScope()
Gets the scope of the access request used for OAuth token refresh.
|
java.lang.String |
getOAuthTokenUrl()
Gets the token url used for OAuth authentication.
|
java.lang.String |
getOAuthTrustStorePassword()
Gets the password for the oauthtruststore file.
|
java.lang.String |
getOAuthTrustStorePath()
Gets the path to the oauthtruststore file, or "" if not specified.
|
java.util.logging.Logger |
getParentLogger()
Get parent Logger of all the Loggers used by this data source.
|
short |
getPort()
Get the port for the data source.
|
int |
getPortInt()
Get the port for the data source as an inteter.
|
java.lang.String |
getPreferredAddressFamily()
Gets the preferred address family type to be used when resolving hostnames.
|
boolean |
getRequestComplexTypes()
Get whether or not connection requests complex type metadata
|
long |
getResultBufferSize()
Get the maximum size of the client side ResultSet cache for the data source.
|
java.lang.String |
getSearchPath()
Get the schema search path for this data source.
|
java.lang.String |
getSessionLabel()
Get the session label for the data source.
|
java.lang.String |
getSessionTimezone()
Get the session timezone for the data source.
|
java.lang.String |
getSocketFactoryName()
Get the custom socket factory name for the data source.
|
java.lang.String |
getSSLSocketFactoryName()
Get the custom SSL socket factory name for the data source.
|
boolean |
getStreamingBatchInsert()
Gets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
|
java.lang.String |
getTLSMode()
Get TLS Mode for the data source.
|
int |
getTransactionIsolation()
Get the transaction isolation for the data source.
|
java.lang.String |
getTrustStorePassword()
Gets the password for the truststore file.
|
java.lang.String |
getTrustStorePath()
Gets the path to the truststore file, or "" if not specified.
|
java.lang.String |
getUser()
Get current user
|
java.lang.String |
getWorkload()
Get the name of the workload associated with this session
|
boolean |
isAutoCommitOnByDefault()
Get if autocommit is enabled by default for the data source.
|
boolean |
isReadOnly()
Get if the data source is read only.
|
boolean |
isSslEnabled()
Deprecated.
getTLSMode method provide finer information. |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setAutoCommitOnByDefault(boolean isAutoCommit)
Set if autocommit is enabled by default for the data source.
|
void |
setBackupServerNode(java.lang.String backupServerNode)
Sets the list of backup server nodes for this data source.
|
void |
setBatchInsertsDirect(boolean isDirect)
Deprecated.
This method has been deprecated. WOS and moveout operations are no longer supported.
All connections use direct batch insert.
|
void |
setBinaryTransfer(boolean enabled)
Sets the flag that indicates whether or not to use binary transfer
|
void |
setConnectionLoadBalance(boolean useConnectionLoadBalance)
Sets the flag that indicates whether or not to use native load balancing.
|
void |
setConnSettings(java.lang.String sql)
ConnSettings are sql statements that the driver will execute when a connection is made.
|
void |
setDatabase(java.lang.String database)
Set the database for the data source.
|
void |
setDisableCopyLocal(boolean disabled)
Sets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
|
void |
setEnableRoutableQueries(boolean enabled)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setFailOnMultiNodePlans(boolean enabled)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setHost(java.lang.String host)
Set the host for the data source.
|
void |
setHostNameVerifier(java.lang.String hvn)
Set user defined HostnameVerifier.
|
void |
setJAASConfigName(java.lang.String name)
Sets the name of the JAAS configuration entry that will be used when performing GSS-Kerberos authentication.
|
void |
setKerberosHostName(java.lang.String name)
Sets the host name portion of the kerberos service principal that identifies the Vertica server.
|
void |
setKerberosServiceName(java.lang.String name)
Sets the service name portion of the kerberos service principal that identifies the Vertica server.
|
void |
setKeyStorePassword(java.lang.String paramString)
Sets the password protecting the keystore file.
|
void |
setKeyStorePath(java.lang.String paramString)
Sets the path to a keystore file (typically in .jks format) to be used for TLS connections.
|
void |
setLocale(java.lang.String locale)
Set the locale for the data source.
|
void |
setLogDirectory(java.lang.String paramString)
Sets the directory used to store log files.
|
void |
setLoginNetworkTimeout(int timeout)
Set the loginNetworkTimeout for the data source.
|
void |
setLoginNodeTimeout(int timeout)
Set the loginNodeTimeout for the data source.
|
void |
setLoginTimeout(int loginTimeout)
Set the login timeout for the data source.
|
void |
setLogLevel(java.lang.String paramString)
Sets the log level
Valid values:
OFF (no logging)
INFO
WARNING
TRACE
ERROR
DEBUG (most verbose)
An invalid value will set log level to OFF
|
void |
setLogNameSpace(java.lang.String value)
Sets the package that logging is restricted to.
|
void |
setMarsEnabled(boolean value) |
void |
setMaxPooledConnections(int max)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setMaxPooledConnectionsPerNode(int max)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setMaxPooledConnectionUses(int uses)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setMetadataCacheLifetime(int lifetime)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setNetworkTimeout(int milliseconds)
Sets the network timeout.
|
void |
setNodeDownWaitTime(int waitTime)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
void |
setOAuthAccessToken(java.lang.String accessToken)
Sets the access token used for OAuth authentication.
|
void |
setOAuthBackwardCompatibility(boolean isEnabled) |
void |
setOAuthClientId(java.lang.String clientId)
Sets the client ID used for OAuth authentication.
|
void |
setOAuthClientSecret(java.lang.String clientSecret)
Sets the client secret used for OAuth authentication.
|
void |
setOAuthDiscoveryUrl(java.lang.String discoveryUrl)
Sets the discovery url used to fetch the OAuth token endpoint.
|
void |
setOAuthRefreshToken(java.lang.String refreshToken)
Sets the refresh token used for OAuth authentication.
|
void |
setOAuthScope(java.lang.String scope)
Sets the scope of the access request used for OAuth token refresh.
|
void |
setOAuthTokenUrl(java.lang.String tokenUrl)
Sets the token url used for OAuth authentication.
|
void |
setOAuthTrustStorePassword(java.lang.String paramString)
Sets the password protecting the oauthtruststore file.
|
void |
setOAuthTrustStorePath(java.lang.String paramString)
Sets the path to a truststore file (typically in .jks format) to be used for TLS connections
to OAuth identity provider.
|
void |
setPort(int port)
Set the port for the data source as an integer.
|
void |
setPort(short port)
Set the port for the data source.
|
void |
setPreferredAddressFamily(java.lang.String value)
Sets the address family type to prefer when the driver resolves hostnames.
|
void |
setReadOnly(boolean readOnly)
Set if the data source is read only.
|
void |
setRequestComplexTypes(boolean enabled)
Sets the flag that indicates whether or not to request complex type metadata
|
void |
setResultBufferSize(long size)
Set the maximum amount of data to cache in bytes when streaming ResultSet data.
|
void |
setSearchPath(java.lang.String searchPath)
Sets the schema search path for this data source.
|
void |
setSessionLabel(java.lang.String label)
Set the session label for the data source.
|
void |
setSessionTimezone(java.lang.String tz) |
void |
setSocketFactoryName(java.lang.String socketFactoryName)
Set the custom socket factory name for the data source.
|
void |
setSslEnabled(boolean isSslEnabled)
Deprecated.
setTLSMode provides finer grained control over the TLS connection process |
void |
setSSLSocketFactoryName(java.lang.String sslSocketFactoryName)
Set the custom SSL socket factory name for the data source.
|
void |
setStreamingBatchInsert(boolean enabled)
Sets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
|
void |
setThreePartNaming(boolean useThreePartNaming)
Set three part naming for the data source.
|
void |
setTLSMode(java.lang.String mode)
Set TLS Mode for data source.
|
void |
setTrustStorePassword(java.lang.String paramString)
Sets the password protecting the truststore file.
|
void |
setTrustStorePath(java.lang.String paramString)
Sets the path to a truststore file (typically in .jks format) to be used for TLS connections.
|
void |
setUser(java.lang.String user)
Sets the current user
|
void |
setWorkload(java.lang.String workload)
sets the workload to associate this session with
|
<T> T |
unwrap(java.lang.Class<T> iface) |
boolean |
useConnectionLoadBalance()
Get whether or not connection load balancing is in use.
|
boolean |
useThreePartNaming()
Get if three-part naming is used for the data source.
|
getConnection, getConnection, getCustomProperty, getLogWriter, getPassword, getPooledConnection, getPooledConnection, getUserID, initialize, removeCustomProperty, setCustomProperty, setLogWriter, setPassword, setURL, setUserID
public boolean areBatchInsertsDirect()
true
if batch inserts go directly into the ROS for the data source.public java.lang.String getDatabase()
public java.lang.String getHost()
public java.lang.String getLocale()
public java.lang.String getSessionTimezone()
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
getLoginTimeout
in class com.vertica.jdbc.common.AbstractDataSource
public int getLoginNetworkTimeout()
public int getLoginNodeTimeout()
public java.lang.String getSocketFactoryName()
public java.lang.String getSSLSocketFactoryName()
public long getResultBufferSize()
public short getPort()
public int getPortInt()
public boolean isReadOnly()
true
if the data source is read only.public java.lang.String getSearchPath()
public java.lang.String getSessionLabel()
public int getTransactionIsolation()
public boolean isAutoCommitOnByDefault()
true
if autocommit is enabled by default for the data source.public boolean isSslEnabled()
getTLSMode
method provide finer information.true
if SSL is enabled (>= Require in TLSMode) for the data source.public java.lang.String getTLSMode()
public java.lang.String getHostNameVerifier()
public boolean useConnectionLoadBalance()
true
if connection load balancing is enabled for the data source.public java.lang.String getBackupServerNode()
public java.lang.String getUser()
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
getParentLogger
in interface javax.sql.CommonDataSource
java.sql.SQLFeatureNotSupportedException
public void setAutoCommitOnByDefault(boolean isAutoCommit)
isAutoCommit
- true
if autocommit is enabled by default for the
data source.@Deprecated public void setBatchInsertsDirect(boolean isDirect)
isDirect
- ignoredpublic void setDatabase(java.lang.String database)
database
- The database for the data source.public void setHost(java.lang.String host)
host
- The host for the data source.public void setLocale(java.lang.String locale)
locale
- The locale for the data source.public void setSessionTimezone(java.lang.String tz)
public void setLoginTimeout(int loginTimeout)
setLoginTimeout
in interface javax.sql.CommonDataSource
setLoginTimeout
in class com.vertica.jdbc.common.AbstractDataSource
loginTimeout
- The login timeout for the data source.public void setLoginNetworkTimeout(int timeout)
timeout
- The loginNetworkTimeout for the data source.public void setLoginNodeTimeout(int timeout)
timeout
- The loginNodeTimeout for the data source.public void setSSLSocketFactoryName(java.lang.String sslSocketFactoryName)
setSocketFactoryName(String socketFactoryName)
), then that
factory will create the raw socket and this factory will be passed that raw socket for I/O.sslSocketFactoryName
- The custom SSL socket factory name for the data source.public void setSocketFactoryName(java.lang.String socketFactoryName)
socketFactoryName
- The custom socket factory name for the data source.public void setResultBufferSize(long size)
size
- A number of bytes.public void setPort(int port)
port
- The port for the data source.public void setPort(short port)
port
- The port for the data source.public void setReadOnly(boolean readOnly)
readOnly
- true
if the data source is read only.public void setSessionLabel(java.lang.String label)
label
- The session label for the data source.public void setSslEnabled(boolean isSslEnabled)
setTLSMode
provides finer grained control over the TLS connection processisSslEnabled
- true
if SSL is enabled for the data source.public void setTLSMode(java.lang.String mode)
mode
- Currently support Disable, Require, Verify-ca and Verify-full.public void setHostNameVerifier(java.lang.String hvn)
hvn
- String value of the customized hostnameverifier class location.public void setThreePartNaming(boolean useThreePartNaming)
useThreePartNaming
- true
if three-part naming is enabled for the data
source.public void setSearchPath(java.lang.String searchPath)
searchPath
- A comma separated list of schema names.public void setBackupServerNode(java.lang.String backupServerNode)
backupServerNode
- A comma separated list of vertica servers (host:port[,host:port...])public void setUser(java.lang.String user)
user
- current userpublic void setConnectionLoadBalance(boolean useConnectionLoadBalance)
useConnectionLoadBalance
- true
if native load balancing is enabled for the data
source.public boolean useThreePartNaming()
true
if three-part naming is enabled for the data source.public java.lang.String getJAASConfigName()
public void setJAASConfigName(java.lang.String name)
name
- The name of a configuration entry in a JAAS configuration file.public java.lang.String getKerberosServiceName()
public void setKerberosServiceName(java.lang.String name)
name
- The Vertica server's kerberos service name.public java.lang.String getKerberosHostName()
public void setKerberosHostName(java.lang.String name)
name
- The Vertica server's kerberos host name.public java.lang.String getOAuthAccessToken()
public void setOAuthAccessToken(java.lang.String accessToken)
accessToken
- The client's access token.public java.lang.String getOAuthRefreshToken()
public void setOAuthRefreshToken(java.lang.String refreshToken)
refreshToken
- The client's refresh token.public java.lang.String getOAuthTokenUrl()
public void setOAuthTokenUrl(java.lang.String tokenUrl)
tokenUrl
- The client's token url.public java.lang.String getOAuthClientId()
public void setOAuthClientId(java.lang.String clientId)
clientId
- The client's ID.public java.lang.String getOAuthClientSecret()
public void setOAuthClientSecret(java.lang.String clientSecret)
clientSecret
- The client's secret.public java.lang.String getOAuthDiscoveryUrl()
public void setOAuthDiscoveryUrl(java.lang.String discoveryUrl)
discoveryUrl
- The client's discovery url.public java.lang.String getOAuthScope()
public void setOAuthScope(java.lang.String scope)
scope
- The scope of the access request used for OAuth token refresh.public boolean getStreamingBatchInsert()
public void setStreamingBatchInsert(boolean enabled)
enabled
- True to store batches in memory, false to send them to the server immediatelypublic boolean getDisableCopyLocal()
public void setDisableCopyLocal(boolean disabled)
disabled
- True to disable file-based COPY LOCAL operationspublic boolean getBinaryTransfer()
true
if binary transfer is enabledpublic void setBinaryTransfer(boolean enabled)
enabled
- True if binary transfer should be enabledpublic boolean getRequestComplexTypes()
true
if request complex types is enabledpublic void setRequestComplexTypes(boolean enabled)
enabled
- True if request complex types should be enabledpublic java.lang.String getWorkload()
public void setWorkload(java.lang.String workload)
workload
- Name of the workloadpublic boolean getOAuthBackwardCompatibility()
public void setOAuthBackwardCompatibility(boolean isEnabled)
public void setConnSettings(java.lang.String sql)
sql
- Semicolon-delimited sql statements that run when a connection is established.public java.lang.String getConnSettings()
@Deprecated public boolean getEnableRoutableQueries()
VerticaRoutableConnection
s are returned by the data source.true
if VerticaRoutableConnections are returned.
@Deprecated public void setEnableRoutableQueries(boolean enabled)
VerticaRoutableConnection
s are returned by the data source.enabled
- true
to enable VerticaRoutableConnections
@Deprecated public boolean getFailOnMultiNodePlans()
VGet
operations.
Only has an effect on VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.true
if non-local plans are allowed.
@Deprecated public void setFailOnMultiNodePlans(boolean enabled)
VGet
operations.
Only has an effect on VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.enabled
- true
to allow non-local plans, false
to disable.
@Deprecated public void setMaxPooledConnectionUses(int uses)
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.uses
- The maximum number of times to use a pooled connection.
@Deprecated public int getMaxPooledConnectionUses()
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.@Deprecated public void setMaxPooledConnections(int max)
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.max
- The maximum number of pooled connections allowed open at a time.
@Deprecated public int getMaxPooledConnections()
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.@Deprecated public void setMaxPooledConnectionsPerNode(int max)
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.max
- The maximum number of pooled connections to a single node allowed open at a time.
@Deprecated public int getMaxPooledConnectionsPerNode()
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.@Deprecated public int getMetadataCacheLifetime()
VGet
operations.
Only has an effect on VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.@Deprecated public void setMetadataCacheLifetime(int lifetime)
VGet
operations.
Only has an effect on VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.lifetime
- Amount of time in seconds to keep metadata cached.
@Deprecated public int getNodeDownWaitTime()
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.@Deprecated public void setNodeDownWaitTime(int waitTime)
VerticaRoutableConnection
s, i.e. when getEnableRoutableQueries()
returns true
.waitTime
- Amount of time in seconds to wait before attempting another connection to a node.
public void setPreferredAddressFamily(java.lang.String value)
value
- The preferred address family to use. One of "ipv6", "ipv4" or "none"public java.lang.String getPreferredAddressFamily()
public void setMarsEnabled(boolean value)
public boolean getMarsEnabled()
public java.lang.String getLogNameSpace()
public void setNetworkTimeout(int milliseconds)
milliseconds
- The network timeout value for the current connection in millisecondspublic int getNetworkTimeout()
public void setLogNameSpace(java.lang.String value)
value
- Namespace for loggingpublic void setLogLevel(java.lang.String paramString)
setLogLevel
in class com.vertica.jdbc.common.AbstractDataSource
paramString
- String indicating the log level. Can also be numbers 1 to 6public com.vertica.support.LogLevel getLogLevel()
getLogLevel
in class com.vertica.jdbc.common.AbstractDataSource
public void setLogDirectory(java.lang.String paramString)
setLogDirectory
in class com.vertica.jdbc.common.AbstractDataSource
paramString
- String indicating the directory to log topublic java.lang.String getLogDirectory()
getLogDirectory
in class com.vertica.jdbc.common.AbstractDataSource
public void setKeyStorePath(java.lang.String paramString)
paramString
- String with a path to a keystore filepublic java.lang.String getKeyStorePath()
public void setTrustStorePath(java.lang.String paramString)
paramString
- String with a path to a truststore filepublic java.lang.String getTrustStorePath()
public void setTrustStorePassword(java.lang.String paramString)
paramString
- The password to the truststore filepublic java.lang.String getTrustStorePassword()
public void setKeyStorePassword(java.lang.String paramString)
paramString
- The password to the keystore filepublic java.lang.String getKeyStorePassword()
public void setOAuthTrustStorePath(java.lang.String paramString)
paramString
- String with a path to a truststore filepublic java.lang.String getOAuthTrustStorePath()
public void setOAuthTrustStorePassword(java.lang.String paramString)
paramString
- The password to the oauthtruststore filepublic java.lang.String getOAuthTrustStorePassword()
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
unwrap
in class com.vertica.jdbc.common.AbstractDataSource
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
isWrapperFor
in class com.vertica.jdbc.common.AbstractDataSource
java.sql.SQLException