DataSource

  • java.lang.Object

  • com.vertica.jdbc.common.BaseConnectionFactory

  • com.vertica.jdbc.common.AbstractDataSource

  • com.vertica.jdbc.hybrid.HybridAbstractDataSource

  • com.vertica.jdbc.DataSource

  • All Implemented Interfaces: java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource

public class DataSource
extends com.vertica.jdbc.hybrid.HybridAbstractDataSource
implements javax.sql.DataSource

Field Summary

Fields inherited from class com.vertica.jdbc.common.BaseConnectionFactory

CONNECTION_LOCALE_KEY, s_Messages, URL_SEPARATOR

Constructor Summary

Constructor and Description
DataSource()

Method Summary

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.
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.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.
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
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 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 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 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
T unwrap(java.lang.Class 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.

Methods inherited from class com.vertica.jdbc.common.AbstractDataSource

getConnection, getConnection, getCustomProperty, getLogWriter, getPassword, getPooledConnection, getPooledConnection, getUserID, initialize, removeCustomProperty, setCustomProperty, setLogWriter, setPassword, setURL, setUserID

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.sql.DataSource

getConnection, getConnection

Methods inherited from interface javax.sql.CommonDataSource

getLogWriter, setLogWriter

Constructor Detail

DataSource

public DataSource()

Method Detail

areBatchInsertsDirect

public boolean areBatchInsertsDirect()

Get if batch inserts are direct for the data source. Returns true if batch inserts go directly into the ROS for the data source.

getDatabase

public java.lang.String getDatabase()

Get the database for the data source. Returns The database for the data source.

getHost

public java.lang.String getHost()

Get the host for the data source. Returns The host for the data source.

getLocale

public java.lang.String getLocale()

Get the locale for the data source. Returns The locale for the data source.

getSessionTimezone

public java.lang.String getSessionTimezone()

Get the session timezone for the data source. Returns A string representing the timezone

getLoginTimeout

public int getLoginTimeout()

Get the login timeout for the data source.

Specified by getLoginTimeout in interface javax.sql.CommonDataSource Overrides getLoginTimeout in class com.vertica.jdbc.common.AbstractDataSource Returns The login timeout for the data source.

getLoginNetworkTimeout

public int getLoginNetworkTimeout()

Get the LoginNetworkTimeout for the data source. Returns The LoginNetworkTimeout for the data source.

getLoginNodeTimeout

public int getLoginNodeTimeout()

Get the LoginNodeTimeout for the data source. Returns The LoginNodeTimeout for the data source.

getSocketFactoryName

public java.lang.String getSocketFactoryName()

Get the custom socket factory name for the data source. Returns The custom socket factory name for the data source.

getSSLSocketFactoryName

public java.lang.String getSSLSocketFactoryName()

Get the custom SSL socket factory name for the data source. Returns The custom socket factory name for the data source.

getResultBufferSize

public long getResultBufferSize()

Get the maximum size of the client side ResultSet cache for the data source. Returns The maximum size of the client side ResultSet cache for the data source.

getPort

public short getPort()

Get the port for the data source. Returns The port for the data source.

getPortInt

public int getPortInt()

Get the port for the data source as an inteter. Returns The port for the data source.

isReadOnly

public boolean isReadOnly()

Get if the data source is read only. Returns true if the data source is read only.

getSearchPath

public java.lang.String getSearchPath()

Get the schema search path for this data source. Returns A comma separated list of schemas.

getSessionLabel

public java.lang.String getSessionLabel()

Get the session label for the data source. Returns The session label for the data source.

getTransactionIsolation

public int getTransactionIsolation()

Get the transaction isolation for the data source. Returns The transaction isolation for the data source.

isAutoCommitOnByDefault

public boolean isAutoCommitOnByDefault()

Get if autocommit is enabled by default for the data source. Returns true if autocommit is enabled by default for the data source.

isSslEnabled

public boolean isSslEnabled()

Deprecated. getTLSMode method provide finer information. Get if SSL is enabled for the data source. Returns true if SSL is enabled (>= Require in TLSMode) for the data source.

getTLSMode

public java.lang.String getTLSMode()

Get TLS Mode for the data source. Returns Currently support Disable, Require, Verify-ca and Verify-full.

getHostNameVerifier

public java.lang.String getHostNameVerifier()

Get if TLS Mode for the data source. Returns Hostname verifer in use, default value is com.vertica.security.VerticaHostnameVerifier.

useConnectionLoadBalance

public boolean useConnectionLoadBalance()

Get whether or not connection load balancing is in use. Returns true if connection load balancing is enabled for the data source.

getBackupServerNode

public java.lang.String getBackupServerNode()

Get list of backup server nodes. Returns Comma-separated list of backup server nodes for this data source.

getUser

public java.lang.String getUser()

Get current user Returns the current user

getParentLogger

public java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException

Get parent Logger of all the Loggers used by this data source.

Specified by getParentLogger in interface javax.sql.CommonDataSource Returns the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source Throws: java.sql.SQLFeatureNotSupportedException

setAutoCommitOnByDefault

public void setAutoCommitOnByDefault(boolean isAutoCommit)

Set if autocommit is enabled by default for the data source. Parameters:isAutoCommit - true if autocommit is enabled by default for the data source.

setBatchInsertsDirect

@Deprecated
public void setBatchInsertsDirect(boolean isDirect)

Deprecated. This method has been deprecated. WOS and moveout operations are no longer supported. All connections use direct batch insert. Set if batch inserts should go directly to the ROS for the data source. Parameters:isDirect - ignored

setDatabase

public void setDatabase(java.lang.String database)

Set the database for the data source. Parameters:database - The database for the data source.

setHost

public void setHost(java.lang.String host)

Set the host for the data source. Parameters:host - The host for the data source.

setLocale

public void setLocale(java.lang.String locale)

Set the locale for the data source. Parameters:locale - The locale for the data source.

setSessionTimezone

public void setSessionTimezone(java.lang.String tz)

setLoginTimeout

public void setLoginTimeout(int loginTimeout)

Set the login timeout for the data source.

Specified by setLoginTimeout in interface javax.sql.CommonDataSource Overrides setLoginTimeout in class com.vertica.jdbc.common.AbstractDataSource Parameters:loginTimeout - The login timeout for the data source.

setLoginNetworkTimeout

public void setLoginNetworkTimeout(int timeout)

Set the loginNetworkTimeout for the data source. Parameters:timeout - The loginNetworkTimeout for the data source.

setLoginNodeTimeout

public void setLoginNodeTimeout(int timeout)

Set the loginNodeTimeout for the data source. Parameters:timeout - The loginNodeTimeout for the data source.

setSSLSocketFactoryName

public void setSSLSocketFactoryName(java.lang.String sslSocketFactoryName)

Set the custom SSL socket factory name for the data source. If set, this must be the name of a class that extends javax.net.ssl.SSLSocketFactory with a zero-argument constructor that is available on the class path.

Typically the SSLSocketFactory will act as a wrapper for a raw socket, performing SSL/TLS encryption prior to forwarding the bytes to the underlying socket.

If also using a cusom socket factory (via setSocketFactoryName(String socketFactoryName)), then that factory will create the raw socket and this factory will be passed that raw socket for I/O. Parameters:sslSocketFactoryName - The custom SSL socket factory name for the data source.

setSocketFactoryName

public void setSocketFactoryName(java.lang.String socketFactoryName)

Set the custom socket factory name for the data source. If set, this must be the name of a class that extends javax.net.SocketFactory with a zero-argument constructor that is available on the class path. Parameters:socketFactoryName - The custom socket factory name for the data source.

setResultBufferSize

public void setResultBufferSize(long size)

Set the maximum amount of data to cache in bytes when streaming ResultSet data. Parameters:size - A number of bytes.

setPort

public void setPort(int port)

Set the port for the data source as an integer. Parameters:port - The port for the data source.

setPort

public void setPort(short port)

Set the port for the data source. Parameters:port - The port for the data source.

setReadOnly

public void setReadOnly(boolean readOnly)

Set if the data source is read only. Parameters:readOnly - true if the data source is read only.

setSessionLabel

public void setSessionLabel(java.lang.String label)

Set the session label for the data source. Parameters:label - The session label for the data source.

setSslEnabled

public void setSslEnabled(boolean isSslEnabled)

Deprecated. setTLSMode provides finer grained control over the TLS connection process Set if SSL is enabled for the data source. Parameters:isSslEnabled - true if SSL is enabled for the data source.

setTLSMode

public void setTLSMode(java.lang.String mode)

Set TLS Mode for data source. value >= Require will enable TLS/SSL. Parameters:mode - Currently support Disable, Require, Verify-ca and Verify-full.

setHostNameVerifier

public void setHostNameVerifier(java.lang.String hvn)

Set user defined HostnameVerifier. Only call this function when default hostnameverifier cannot fulfill the requirements. Parameters:hvn - String value of the customized hostnameverifier class location.

setThreePartNaming

public void setThreePartNaming(boolean useThreePartNaming)

Set three part naming for the data source. When enabled, metadata ResultSets containing a catalog column will report the database name as the catalog, rather than NULL. Parameters:useThreePartNaming - true if three-part naming is enabled for the data source.

setSearchPath

public void setSearchPath(java.lang.String searchPath)

Sets the schema search path for this data source. Parameters:searchPath - A comma separated list of schema names.

setBackupServerNode

public void setBackupServerNode(java.lang.String backupServerNode)

Sets the list of backup server nodes for this data source. Parameters:backupServerNode - A comma separated list of vertica servers (host:port[,host:port...])

setUser

public void setUser(java.lang.String user)

Sets the current user Parameters:user - current user

setConnectionLoadBalance

public void setConnectionLoadBalance(boolean useConnectionLoadBalance)

Sets the flag that indicates whether or not to use native load balancing. Parameters:useConnectionLoadBalance - true if native load balancing is enabled for the data source.

useThreePartNaming

public boolean useThreePartNaming()

Get if three-part naming is used for the data source. When enabled, metadata ResultSets containing a catalog column will report the database name as the catalog, rather than NULL. Returns true if three-part naming is enabled for the data source.

getJAASConfigName

public java.lang.String getJAASConfigName()

Gets the name of the JAAS configuration entry that will the driver will use when performing GSS authentication. Returns A JAAS configuration name

setJAASConfigName

public void setJAASConfigName(java.lang.String name)

Sets the name of the JAAS configuration entry that will be used when performing GSS-Kerberos authentication.

The driver relies on JAAS to acquire a kerberos ticket-granting-ticket when the database server requests that the client uses GSS authentication. The JAAS configuration identified by this name can be used to customize this process. Parameters:name - The name of a configuration entry in a JAAS configuration file.

getKerberosServiceName

public java.lang.String getKerberosServiceName()

Gets the service name portion of the kerberos service principal that identifies the Vertica server. Returns The Vertica server's kerberos service name.

setKerberosServiceName

public void setKerberosServiceName(java.lang.String name)

Sets the service name portion of the kerberos service principal that identifies the Vertica server.

When the Vertica server requests that the client uses GSS authentication, the client uses this name to request a kerberos service ticket. The value of this property should match the database's KerberosServiceName config parameter. Parameters:name - The Vertica server's kerberos service name.

getKerberosHostName

public java.lang.String getKerberosHostName()

Gets the host name portion of the kerberos service principal that identifies the Vertica server. Returns The Vertica server's kerberos host name.

setKerberosHostName

public void setKerberosHostName(java.lang.String name)

Sets the host name portion of the kerberos service principal that identifies the Vertica server.

When the Vertica server requests that the client uses GSS authentication, the client uses this name to request a kerberos service ticket. The value of this property should match the database's KerberosHostName config parameter. Parameters:name - The Vertica server's kerberos host name.

getOAuthAccessToken

public java.lang.String getOAuthAccessToken()

Gets the access token used for OAuth authentication. Returns The client's access token.

setOAuthAccessToken

public void setOAuthAccessToken(java.lang.String accessToken)

Sets the access token used for OAuth authentication. Parameters:accessToken - The client's access token.

getOAuthRefreshToken

public java.lang.String getOAuthRefreshToken()

Gets the refresh token used for OAuth authentication. Returns The client's refresh token.

setOAuthRefreshToken

public void setOAuthRefreshToken(java.lang.String refreshToken)

Sets the refresh token used for OAuth authentication. Parameters:refreshToken - The client's refresh token.

getOAuthTokenUrl

public java.lang.String getOAuthTokenUrl()

Gets the token url used for OAuth authentication. Returns The client's token url.

setOAuthTokenUrl

public void setOAuthTokenUrl(java.lang.String tokenUrl)

Sets the token url used for OAuth authentication. Parameters:tokenUrl - The client's token url.

getOAuthClientId

public java.lang.String getOAuthClientId()

Gets the client ID used for OAuth authentication. Returns The client's ID.

setOAuthClientId

public void setOAuthClientId(java.lang.String clientId)

Sets the client ID used for OAuth authentication. Parameters:clientId - The client's ID.

getOAuthClientSecret

public java.lang.String getOAuthClientSecret()

Gets the client secret used for OAuth authentication. Returns The client's secret.

setOAuthClientSecret

public void setOAuthClientSecret(java.lang.String clientSecret)

Sets the client secret used for OAuth authentication. Parameters:clientSecret - The client's secret.

getOAuthDiscoveryUrl

public java.lang.String getOAuthDiscoveryUrl()

Gets the discovery url used to fetch the OAuth token endpoint. Returns The client's discovery url.

setOAuthDiscoveryUrl

public void setOAuthDiscoveryUrl(java.lang.String discoveryUrl)

Sets the discovery url used to fetch the OAuth token endpoint. Parameters:discoveryUrl - The client's discovery url.

getOAuthScope

public java.lang.String getOAuthScope()

Gets the scope of the access request used for OAuth token refresh. Returns The scope of the access request used for OAuth token refresh.

setOAuthScope

public void setOAuthScope(java.lang.String scope)

Sets the scope of the access request used for OAuth token refresh. Parameters:scope - The scope of the access request used for OAuth token refresh.

getStreamingBatchInsert

public boolean getStreamingBatchInsert()

Gets the value of the connection setting that determines whether the streaming or non-streaming batch insert model is used. Returns true if batches are stored in memory, false if they are sent to the server immediately

setStreamingBatchInsert

public void setStreamingBatchInsert(boolean enabled)

Sets the value of the connection setting that determines whether the streaming or non-streaming batch insert model is used. Parameters:enabled - True to store batches in memory, false to send them to the server immediately

getDisableCopyLocal

public boolean getDisableCopyLocal()

Gets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled. Returns true if file-based COPY LOCAL operations are disabled

setDisableCopyLocal

public void setDisableCopyLocal(boolean disabled)

Sets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled. Parameters:disabled - True to disable file-based COPY LOCAL operations

getBinaryTransfer

public boolean getBinaryTransfer()

Get whether or not connection uses binary transfer Returns true if binary transfer is enabled

setBinaryTransfer

public void setBinaryTransfer(boolean enabled)

Sets the flag that indicates whether or not to use binary transfer Parameters:enabled - True if binary transfer should be enabled

setConnSettings

public void setConnSettings(java.lang.String sql)

ConnSettings are sql statements that the driver will execute when a connection is made. This is typically used to initialize session variables automatically with each connection. Parameters:sql - Semicolon-delimited sql statements that run when a connection is established.

getConnSettings

public java.lang.String getConnSettings()

Returns the session initialization sql that will run when a connection is established. If no ConnSettings was specified, "" is returned. Returns Semicolon-delimited sql thats that run when a connection is established.

getEnableRoutableQueries

@Deprecated
public boolean getEnableRoutableQueries()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Get if VerticaRoutableConnections are returned by the data source. Returns true if VerticaRoutableConnections are returned.

setEnableRoutableQueries

@Deprecated
public void setEnableRoutableQueries(boolean enabled)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Set if VerticaRoutableConnections are returned by the data source. Parameters:enabled - true to enable VerticaRoutableConnections

getFailOnMultiNodePlans

@Deprecated
public boolean getFailOnMultiNodePlans()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Get if non-local plans are allowed in VGet operations.

Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns true if non-local plans are allowed.

setFailOnMultiNodePlans

@Deprecated
public void setFailOnMultiNodePlans(boolean enabled)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Get if non-local plans are allowed in VGet operations. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:enabled - true to allow non-local plans, false to disable.

setMaxPooledConnectionUses

@Deprecated
public void setMaxPooledConnectionUses(int uses)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Set the maximum number times to use a pooled connection before closing it. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:uses - The maximum number of times to use a pooled connection.

getMaxPooledConnectionUses

@Deprecated
public int getMaxPooledConnectionUses()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Gets the maximum number times to use a pooled connection before closing it. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns The maximum number of times to use a pooled connection.

setMaxPooledConnections

@Deprecated
public void setMaxPooledConnections(int max)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Set the maximum number of pooled connections. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:max - The maximum number of pooled connections allowed open at a time.

getMaxPooledConnections

@Deprecated
public int getMaxPooledConnections()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Gets the maximum number of pooled connections. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns The maximum number pooled connections allowed open at a time.

setMaxPooledConnectionsPerNode

@Deprecated
public void setMaxPooledConnectionsPerNode(int max)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Set the maximum number of pooled connections per node. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:max - The maximum number of pooled connections to a single node allowed open at a time.

getMaxPooledConnectionsPerNode

@Deprecated
public int getMaxPooledConnectionsPerNode()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Gets the maximum number of pooled connections per node. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns The maximum number pooled connections to a single node allowed at a time.

getMetadataCacheLifetime

@Deprecated
public int getMetadataCacheLifetime()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Gets the number of seconds to reuse table and projection metadata during VGet operations. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns Amount of time in seconds to keep metadata cached.

setMetadataCacheLifetime

@Deprecated
public void setMetadataCacheLifetime(int lifetime)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Sets the number of seconds to reuse table and projection metadata during VGet operations. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:lifetime - Amount of time in seconds to keep metadata cached.

getNodeDownWaitTime

@Deprecated
public int getNodeDownWaitTime()

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Gets the number of seconds to wait before attempting a new connection to a node after detecting a connection failure. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Returns Amount of time in seconds to wait before attempting another connection to a node.

setNodeDownWaitTime

@Deprecated
public void setNodeDownWaitTime(int waitTime)

Deprecated. This feature is likely to stop working in a future release and to be removed as a result. Sets the number of seconds to wait before attempting a new connection to a node after detecting a connection failure. Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true. Parameters:waitTime - Amount of time in seconds to wait before attempting another connection to a node.

setPreferredAddressFamily

public void setPreferredAddressFamily(java.lang.String value)

Sets the address family type to prefer when the driver resolves hostnames.

When set to to "ipv6" the driver will attempt to use IPv6 type AAAA DNS records before IPv4 type A DNS records. When set to "ipv4", the driver will use IPv4 type A DNS records first.

When set to "none" (the default), the driver will take no preference, and instead use the records in the order returned by the JRE. Parameters:value - The preferred address family to use. One of "ipv6", "ipv4" or "none"

getPreferredAddressFamily

public java.lang.String getPreferredAddressFamily()

Gets the preferred address family type to be used when resolving hostnames. Returns The preferred address family type for the data source.

setMarsEnabled

public void setMarsEnabled(boolean value)

getMarsEnabled

public boolean getMarsEnabled()

getLogNameSpace

public java.lang.String getLogNameSpace()

Gets package that logging is restricted to Returns Namespace for logging

setNetworkTimeout

public void setNetworkTimeout(int milliseconds)

Sets the network timeout. Valid values:

≥= 0

Parameters:

milliseconds - The network timeout value for the current connection in milliseconds

getNetworkTimeout

public int getNetworkTimeout()

Gets the current network timeout value. Returns Network timeout value in milliseconds

setLogNameSpace

public void setLogNameSpace(java.lang.String value)

Sets the package that logging is restricted to. Valid values:

com.vertica (all messages generated by the JDBC driver)

  • com.vertica.jdbc (all messages generated by the top-level JDBC API)

  • com.vertica.jdbc.core (connection and statement settings)

  • com.vertica.jdbc.io (client/server protocol messages)

  • com.vertica.jdbc.util (miscellaneous utilities)

  • com.vertica.jdbc.dataengine (query execution and result set iteration).

Parameters:

value - Namespace for logging

setLogLevel

public 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

Overrides setLogLevel in class com.vertica.jdbc.common.AbstractDataSource

Parameters:

paramString - String indicating the log level. Can also be numbers 1 to 6

getLogLevel

public com.vertica.support.LogLevel getLogLevel()

Gets current level of logging

Overrides getLogLevel in class com.vertica.jdbc.common.AbstractDataSource Returns The level of logging

setLogDirectory

public void setLogDirectory(java.lang.String paramString)

Sets the directory used to store log files. The directory will be created if it does not exist.

Overrides setLogDirectory in class com.vertica.jdbc.common.AbstractDataSource Parameters:paramString - String indicating the directory to log to

getLogDirectory

public java.lang.String getLogDirectory()

Gets the directory used to store log files

Overrides getLogDirectory in class com.vertica.jdbc.common.AbstractDataSource Returns The log directory

setKeyStorePath

public void setKeyStorePath(java.lang.String paramString)

Sets the path to a keystore file (typically in .jks format) to be used for TLS connections. If not specified, the JVM-global keystore is used. Parameters:paramString - String with a path to a keystore file

getKeyStorePath

public java.lang.String getKeyStorePath()

Gets the path to the keystore file, or "" if not specified. Returns The path to the keystore file

setTrustStorePath

public void setTrustStorePath(java.lang.String paramString)

Sets the path to a truststore file (typically in .jks format) to be used for TLS connections. If not specified, the JVM-global truststore is used. Parameters:paramString - String with a path to a truststore file

getTrustStorePath

public java.lang.String getTrustStorePath()

Gets the path to the truststore file, or "" if not specified. Returns The path to the truststore file

setTrustStorePassword

public void setTrustStorePassword(java.lang.String paramString)

Sets the password protecting the truststore file. Only used if a custom truststore path is specified. Parameters:paramString - The password to the truststore file

getTrustStorePassword

public java.lang.String getTrustStorePassword()

Gets the password for the truststore file. Returns The password for the truststore file.

setKeyStorePassword

public void setKeyStorePassword(java.lang.String paramString)

Sets the password protecting the keystore file. Only used if a custom keystore path is specified. If both the keystore and the keys within the keystore are password protected, they must use the same password specified here. Parameters:paramString - The password to the keystore file

getKeyStorePassword

public java.lang.String getKeyStorePassword()

Gets the password for the keystore file. Returns The password for the keystore file.

unwrap

public  T unwrap(java.lang.Class iface)
throws java.sql.SQLException

Specified by unwrap in interface java.sql.Wrapper Overrides unwrap in class com.vertica.jdbc.common.AbstractDataSource Throws: java.sql.SQLException

isWrapperFor

public boolean isWrapperFor(java.lang.Class iface)
throws java.sql.SQLException

Specified by isWrapperFor in interface java.sql.Wrapper Overrides isWrapperFor in class com.vertica.jdbc.common.AbstractDataSource Throws: java.sql.SQLException