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 |
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 |
getNodeDownWaitTime()
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
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 |
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.
|
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)
Set if batch inserts should go directly to the ROS for the data source.
|
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 |
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 |
setNodeDownWaitTime(int waitTime)
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
|
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 |
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.
|
<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, setUserIDpublic 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 int getLoginTimeout()
getLoginTimeout in interface javax.sql.CommonDataSourcegetLoginTimeout in class com.vertica.jdbc.common.AbstractDataSourcepublic 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.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
getParentLogger in interface javax.sql.CommonDataSourcejava.sql.SQLFeatureNotSupportedExceptionpublic void setAutoCommitOnByDefault(boolean isAutoCommit)
isAutoCommit - true if autocommit is enabled by default for the
data source.public void setBatchInsertsDirect(boolean isDirect)
isDirect - true if batch inserts should go directly to the ROS. false to have batch inserts trickle through the WOSpublic 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 setLoginTimeout(int loginTimeout)
setLoginTimeout in interface javax.sql.CommonDataSourcesetLoginTimeout in class com.vertica.jdbc.common.AbstractDataSourceloginTimeout - The login timeout 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 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 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 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()
VerticaRoutableConnections are returned by the data source.true if VerticaRoutableConnections are returned.
@Deprecated public void setEnableRoutableQueries(boolean enabled)
VerticaRoutableConnections are returned by the data source.enabled - true to enable VerticaRoutableConnections
@Deprecated public boolean getFailOnMultiNodePlans()
VGet operations.
Only has an effect on VerticaRoutableConnections, 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 VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.enabled - true to allow non-local plans, false to disable.
@Deprecated public void setMaxPooledConnectionUses(int uses)
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.uses - The maximum number of times to use a pooled connection.
@Deprecated public int getMaxPooledConnectionUses()
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.@Deprecated public void setMaxPooledConnections(int max)
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.max - The maximum number of pooled connections allowed open at a time.
@Deprecated public int getMaxPooledConnections()
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.@Deprecated public void setMaxPooledConnectionsPerNode(int max)
VerticaRoutableConnections, 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()
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.@Deprecated public int getMetadataCacheLifetime()
VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.@Deprecated public void setMetadataCacheLifetime(int lifetime)
VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.lifetime - Amount of time in seconds to keep metadata cached.
@Deprecated public int getNodeDownWaitTime()
VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.@Deprecated public void setNodeDownWaitTime(int waitTime)
VerticaRoutableConnections, 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 setLogNameSpace(java.lang.String value)
value - Namespace for loggingpublic void setLogLevel(java.lang.String paramString)
setLogLevel in class com.vertica.jdbc.common.AbstractDataSourceparamString - String indicating the log level. Can also be numbers 1 to 6public com.vertica.support.LogLevel getLogLevel()
getLogLevel in class com.vertica.jdbc.common.AbstractDataSourcepublic void setLogDirectory(java.lang.String paramString)
setLogDirectory in class com.vertica.jdbc.common.AbstractDataSourceparamString - String indicating the directory to log topublic java.lang.String getLogDirectory()
getLogDirectory in class com.vertica.jdbc.common.AbstractDataSourcepublic 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 <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperunwrap in class com.vertica.jdbc.common.AbstractDataSourcejava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.WrapperisWrapperFor in class com.vertica.jdbc.common.AbstractDataSourcejava.sql.SQLException