com.amazon.redshift.ds.common

## Class BaseDataSource

- java.lang.Object
- - com.amazon.redshift.ds.common.BaseDataSource

All Implemented Interfaces:
  Referenceable, CommonDataSource

Direct Known Subclasses:
  RedshiftConnectionPoolDataSource, RedshiftPoolingDataSource, RedshiftSimpleDataSource, RedshiftXADataSource

    public abstract class BaseDataSource
    extends Object
    implements CommonDataSource, Referenceable

Base class for data sources and related classes.

Author:
  Aaron Mulder (ammulder@chariotsolutions.com)

### Constructor Summary

Constructors
Constructor and Description
`BaseDataSource()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
`protected Reference` `createReference()` Generates a reference using the appropriate object factory.
`boolean` `getAllowEncodingChanges()`
`String` `getApplicationName()`
`String` `getAssumeMinServerVersion()`
`AutoSave` `getAutosave()`
`boolean` `getBinaryTransfer()`
`String` `getBinaryTransferDisable()`
`String` `getBinaryTransferEnable()`
`int` `getCancelSignalTimeout()`
`boolean` `getCleanupSavepoints()` see RedshiftProperty#CLEANUP_SAVEPOINTS
`Connection` `getConnection()` Gets a connection to the Redshift database.
`Connection` `getConnection(String user, String password)` Gets a connection to the Redshift database.
`int` `getConnectTimeout()`
`String` `getCurrentSchema()`
`int` `getDatabaseMetadataCacheFields()`
`int` `getDatabaseMetadataCacheFieldsMiB()`
`String` `getDatabaseName()` Gets the name of the Redshift database, running on the server identified by the serverName property.
`int` `getDefaultRowFetchSize()`
`abstract String` `getDescription()` Gets a description of this DataSource-ish thing.
`boolean` `getDisableColumnSanitiser()`
`String` `getEscapeSyntaxCallMode()`
`String` `getGssLib()`
`boolean` `getHideUnprivilegedObjects()`
`int` `getHostRecheckSeconds()`
`String` `getJaasApplicationName()`
`boolean` `getJaasLogin()`
`String` `getKerberosServerName()`
`boolean` `getLoadBalanceHosts()`
`String` `getLogDirectory()`
`String` `getLoggerFile()`
`String` `getLoggerLevel()`
`int` `getLoginTimeout()`
`boolean` `getLogServerErrorDetail()`
`boolean` `getLogUnclosedConnections()`
`PrintWriter` `getLogWriter()` This implementation don't use a LogWriter.
`String` `getMaxResultBuffer()`
`String` `getOptions()`
`Logger` `getParentLogger()`
`String` `getPassword()` Gets the password to connect with by default.
`int` `getPortNumber()` Deprecated. use `getPortNumbers()`
`int[]` `getPortNumbers()` Gets the port(s) which the Redshift server is listening on for TCP/IP connections.
`PreferQueryMode` `getPreferQueryMode()`
`int` `getPreparedStatementCacheQueries()`
`int` `getPreparedStatementCacheSizeMiB()`
`int` `getPrepareThreshold()`
`String` `getProperty(RedshiftProperty property)`
`String` `getProperty(String name)`
`int` `getProtocolVersion()`
`boolean` `getReadOnly()`
`String` `getReadOnlyMode()`
`int` `getReceiveBufferSize()`
`int` `getRecvBufferSize()`
`Reference` `getReference()`
`String` `getReplication()`
`boolean` `getReWriteBatchedInserts()`
`int` `getSendBufferSize()`
`String` `getServerName()` Deprecated. use `getServerNames()`
`String[]` `getServerNames()` Gets the name of the host(s) the Redshift database is running on.
`String` `getSocketFactory()`
`String` `getSocketFactoryArg()`
`int` `getSocketTimeout()`
`boolean` `getSsl()`
`String` `getSslcert()`
`String` `getSslCert()`
`String` `getSslfactory()`
`String` `getSslfactoryarg()`
`String` `getSslFactoryArg()`
`String` `getSslhostnameverifier()`
`String` `getSslHostnameVerifier()`
`String` `getSslkey()`
`String` `getSslKey()`
`String` `getSslmode()`
`String` `getSslMode()`
`String` `getSslpassword()`
`String` `getSslPassword()`
`String` `getSslpasswordcallback()`
`String` `getSslPasswordCallback()`
`String` `getSslrootcert()`
`String` `getSslRootCert()`
`String` `getSspiServiceClass()`
`String` `getStringType()`
`String` `getTargetServerType()`
`boolean` `getTcpKeepAlive()`
`int` `getUnknownLength()`
`String` `getUrl()` Generates a `DriverManager` URL from the other properties supplied.
`String` `getURL()` Generates a `DriverManager` URL from the other properties supplied.
`String` `getUser()` Gets the user to connect as by default.
`String` `getUserID()` Added for backward compatibility.
`boolean` `getUseSpNego()`
`void` `initializeFrom(BaseDataSource source)`
`boolean` `isAllowEncodingChanges()`
`boolean` `isCleanupSavePoints()`
`boolean` `isColumnSanitiserDisabled()`
`boolean` `isDisableColumnSanitiser()`
`boolean` `isLoadBalanceHosts()`
`boolean` `isLogUnclosedConnections()`
`boolean` `isRaiseExceptionOnSilentRollback()`
`boolean` `isReadOnly()`
`boolean` `isReWriteBatchedInserts()`
`boolean` `isSsl()`
`boolean` `isTcpKeepAlive()`
`protected void` `readBaseObject(ObjectInputStream in)`
`void` `setAllowEncodingChanges(boolean allow)`
`void` `setApplicationName(String applicationName)`
`void` `setAssumeMinServerVersion(String minVersion)`
`void` `setAutosave(AutoSave autoSave)`
`void` `setBinaryTransfer(boolean enabled)`
`void` `setBinaryTransferDisable(String oidList)`
`void` `setBinaryTransferEnable(String oidList)`
`void` `setCancelSignalTimeout(int seconds)`
`void` `setCleanupSavepoints(boolean cleanupSavepoints)` see RedshiftProperty#CLEANUP_SAVEPOINTS
`void` `setCleanupSavePoints(boolean cleanupSavepoints)`
`void` `setConnectTimeout(int connectTimeout)`
`void` `setCurrentSchema(String currentSchema)`
`void` `setDatabaseMetadataCacheFields(int cacheSize)`
`void` `setDatabaseMetadataCacheFieldsMiB(int cacheSize)`
`void` `setDatabaseName(String databaseName)` Sets the name of the Redshift database, running on the server identified by the serverName property.
`void` `setDefaultRowFetchSize(int fetchSize)`
`void` `setDisableColumnSanitiser(boolean disableColumnSanitiser)`
`void` `setEscapeSyntaxCallMode(String callMode)`
`void` `setFromReference(Reference ref)`
`void` `setGssLib(String lib)`
`void` `setHideUnprivilegedObjects(boolean hideUnprivileged)`
`void` `setHostRecheckSeconds(int hostRecheckSeconds)`
`void` `setJaasApplicationName(String name)`
`void` `setJaasLogin(boolean doLogin)`
`void` `setKerberosServerName(String serverName)`
`void` `setLoadBalanceHosts(boolean loadBalanceHosts)`
`void` `setLogDirectory(String logDirectory)` Added for backward compatibility.
`void` `setLoggerFile(String loggerFile)`
`void` `setLoggerLevel(String loggerLevel)`
`void` `setLoginTimeout(int loginTimeout)`
`void` `setLogLevel(String level)` Added for backward compatibility.
`void` `setLogServerErrorDetail(boolean enabled)`
`void` `setLogUnclosedConnections(boolean enabled)`
`void` `setLogWriter(PrintWriter printWriter)` This implementation don't use a LogWriter.
`void` `setMaxResultBuffer(String maxResultBuffer)`
`void` `setOptions(String options)` Set command line options for this connection
`void` `setPassword(String password)` Sets the password to connect with by default.
`void` `setPortNumber(int portNumber)` Deprecated. use `setPortNumbers(int[])`
`void` `setPortNumbers(int[] portNumbers)` Sets the port(s) which the Redshift server is listening on for TCP/IP connections.
`void` `setPreferQueryMode(PreferQueryMode preferQueryMode)`
`void` `setPreparedStatementCacheQueries(int cacheSize)`
`void` `setPreparedStatementCacheSizeMiB(int cacheSize)`
`void` `setPrepareThreshold(int count)`
`void` `setProperty(RedshiftProperty property, String value)`
`void` `setProperty(String name, String value)`
`void` `setProtocolVersion(int protocolVersion)`
`void` `setRaiseExceptionOnSilentRollback(boolean raiseExceptionOnSilentRollback)`
`void` `setReadOnly(boolean readOnly)`
`void` `setReadOnlyMode(String mode)`
`void` `setReceiveBufferSize(int nbytes)`
`void` `setRecvBufferSize(int nbytes)`
`void` `setReplication(String replication)`
`void` `setReWriteBatchedInserts(boolean reWrite)`
`void` `setSendBufferSize(int nbytes)`
`void` `setServerName(String serverName)` Deprecated. use `setServerNames(String[])`
`void` `setServerNames(String[] serverNames)` Sets the name of the host(s) the Redshift database is running on.
`void` `setSocketFactory(String socketFactoryClassName)`
`void` `setSocketFactoryArg(String socketFactoryArg)`
`void` `setSocketTimeout(int seconds)`
`void` `setSsl(boolean enabled)`
`void` `setSslcert(String file)`
`void` `setSslCert(String file)`
`void` `setSslfactory(String classname)`
`void` `setSslfactoryarg(String arg)`
`void` `setSslFactoryArg(String arg)`
`void` `setSslhostnameverifier(String className)`
`void` `setSslHostnameVerifier(String className)`
`void` `setSslkey(String file)`
`void` `setSslKey(String file)`
`void` `setSslmode(String mode)`
`void` `setSslMode(String mode)`
`void` `setSslpassword(String sslpassword)`
`void` `setSslPassword(String password)`
`void` `setSslpasswordcallback(String className)`
`void` `setSslPasswordCallback(String className)`
`void` `setSslrootcert(String file)`
`void` `setSslRootCert(String file)`
`void` `setSspiServiceClass(String serviceClass)`
`void` `setStringType(String stringType)`
`void` `setTargetServerType(String targetServerType)`
`void` `setTcpKeepAlive(boolean enabled)`
`void` `setUnknownLength(int unknownLength)`
`void` `setUrl(String url)` Sets properties from a `DriverManager` URL.
`void` `setURL(String url)` Sets properties from a `DriverManager` URL.
`void` `setUser(String user)` Sets the user to connect as by default.
`void` `setUserID(String id)` Added for backward compatibility.
`void` `setUseSpNego(boolean use)`
`protected void` `writeBaseObject(ObjectOutputStream out)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BaseDataSource

    public BaseDataSource()

### Method Detail

#### getConnection

    public Connection getConnection()
                             throws SQLException

Gets a connection to the Redshift database. The database is identified by the DataSource properties serverName, databaseName, and portNumber. The user to connect as is identified by the DataSource properties user and password.

Returns:
  A valid database connection.
Throws:
  `SQLException` - Occurs when the database connection cannot be established.

#### getConnection

    public Connection getConnection(String user,
                                    String password)
                             throws SQLException

Gets a connection to the Redshift database. The database is identified by the DataSource properties serverName, databaseName, and portNumber. The user to connect as is identified by the arguments user and password, which override the DataSource properties by the same name.

Parameters:
  `user` - user
  `password` - password
Returns:
  A valid database connection.
Throws:
  `SQLException` - Occurs when the database connection cannot be established.

#### getLogWriter

    public PrintWriter getLogWriter()

This implementation don't use a LogWriter.

Specified by:
  `getLogWriter` in interface `CommonDataSource`

#### setLogWriter

    public void setLogWriter(PrintWriter printWriter)

This implementation don't use a LogWriter.

Specified by:
  `setLogWriter` in interface `CommonDataSource`
Parameters:
  `printWriter` - Not used

#### getServerName

    @Deprecated
    public String getServerName()

Deprecated. use `getServerNames()`
Gets the name of the host the Redshift database is running on.

Returns:
  name of the host the Redshift database is running on

#### getServerNames

    public String[] getServerNames()

Gets the name of the host(s) the Redshift database is running on.

Returns:
  name of the host(s) the Redshift database is running on

#### setServerName

    @Deprecated
    public void setServerName(String serverName)

Deprecated. use `setServerNames(String[])`
Sets the name of the host the Redshift database is running on. If this is changed, it will only affect future calls to getConnection. The default value is `localhost`.

Parameters:
  `serverName` - name of the host the Redshift database is running on

#### setServerNames

    public void setServerNames(String[] serverNames)

Sets the name of the host(s) the Redshift database is running on. If this is changed, it will only affect future calls to getConnection. The default value is `localhost`.

Parameters:
  `serverNames` - name of the host(s) the Redshift database is running on

#### getDatabaseName

    public String getDatabaseName()

Gets the name of the Redshift database, running on the server identified by the serverName property.

Returns:
  name of the Redshift database

#### setDatabaseName

    public void setDatabaseName(String databaseName)

Sets the name of the Redshift database, running on the server identified by the serverName property. If this is changed, it will only affect future calls to getConnection.

Parameters:
  `databaseName` - name of the Redshift database

#### getDescription

    public abstract String getDescription()

Gets a description of this DataSource-ish thing. Must be customized by subclasses.

Returns:
  description of this DataSource-ish thing

#### getUser

    public String getUser()

Gets the user to connect as by default. If this is not specified, you must use the getConnection method which takes a user and password as parameters.

Returns:
  user to connect as by default

#### getUserID

    public String getUserID()

Added for backward compatibility.

Returns:
  user to connect as by default

#### setUser

    public void setUser(String user)

Sets the user to connect as by default. If this is not specified, you must use the getConnection method which takes a user and password as parameters. If this is changed, it will only affect future calls to getConnection.

Parameters:
  `user` - user to connect as by default

#### setUserID

    public void setUserID(String id)

Added for backward compatibility.

Parameters:
  `id` - user to connect as by default

#### getPassword

    public String getPassword()

Gets the password to connect with by default. If this is not specified but a password is needed to log in, you must use the getConnection method which takes a user and password as parameters.

Returns:
  password to connect with by default

#### setPassword

    public void setPassword(String password)

Sets the password to connect with by default. If this is not specified but a password is needed to log in, you must use the getConnection method which takes a user and password as parameters. If this is changed, it will only affect future calls to getConnection.

Parameters:
  `password` - password to connect with by default

#### getPortNumber

    @Deprecated
    public int getPortNumber()

Deprecated. use `getPortNumbers()`
Gets the port which the Redshift server is listening on for TCP/IP connections.

Returns:
  The port, or 0 if the default port will be used.

#### getPortNumbers

    public int[] getPortNumbers()

Gets the port(s) which the Redshift server is listening on for TCP/IP connections.

Returns:
  The port(s), or 0 if the default port will be used.

#### setPortNumber

    @Deprecated
    public void setPortNumber(int portNumber)

Deprecated. use `setPortNumbers(int[])`
Sets the port which the Redshift server is listening on for TCP/IP connections. Be sure the -i flag is passed to postmaster when Redshift is started. If this is not set, or set to 0, the default port will be used.

Parameters:
  `portNumber` - port which the Redshift server is listening on for TCP/IP

#### setPortNumbers

    public void setPortNumbers(int[] portNumbers)

Sets the port(s) which the Redshift server is listening on for TCP/IP connections. Be sure the -i flag is passed to postmaster when Redshift is started. If this is not set, or set to 0, the default port will be used.

Parameters:
  `portNumbers` - port(s) which the Redshift server is listening on for TCP/IP

#### getOptions

    public String getOptions()

Returns:
  command line options for this connection

#### setOptions

    public void setOptions(String options)

Set command line options for this connection

Parameters:
  `options` - string to set options to

#### getLoginTimeout

    public int getLoginTimeout()

Specified by:
  `getLoginTimeout` in interface `CommonDataSource`
Returns:
  login timeout
See Also:
  `RedshiftProperty.LOGIN_TIMEOUT`

#### setLoginTimeout

    public void setLoginTimeout(int loginTimeout)

Specified by:
  `setLoginTimeout` in interface `CommonDataSource`
Parameters:
  `loginTimeout` - login timeout
See Also:
  `RedshiftProperty.LOGIN_TIMEOUT`

#### getConnectTimeout

    public int getConnectTimeout()

Returns:
  connect timeout
See Also:
  `RedshiftProperty.CONNECT_TIMEOUT`

#### setConnectTimeout

    public void setConnectTimeout(int connectTimeout)

Parameters:
  `connectTimeout` - connect timeout
See Also:
  `RedshiftProperty.CONNECT_TIMEOUT`

#### getProtocolVersion

    public int getProtocolVersion()

Returns:
  protocol version
See Also:
  `RedshiftProperty.PROTOCOL_VERSION`

#### setProtocolVersion

    public void setProtocolVersion(int protocolVersion)

Parameters:
  `protocolVersion` - protocol version
See Also:
  `RedshiftProperty.PROTOCOL_VERSION`

#### getReceiveBufferSize

    public int getReceiveBufferSize()

Returns:
  receive buffer size
See Also:
  `RedshiftProperty.RECEIVE_BUFFER_SIZE`

#### setReceiveBufferSize

    public void setReceiveBufferSize(int nbytes)

Parameters:
  `nbytes` - receive buffer size
See Also:
  `RedshiftProperty.RECEIVE_BUFFER_SIZE`

#### getSendBufferSize

    public int getSendBufferSize()

Returns:
  send buffer size
See Also:
  `RedshiftProperty.SEND_BUFFER_SIZE`

#### setSendBufferSize

    public void setSendBufferSize(int nbytes)

Parameters:
  `nbytes` - send buffer size
See Also:
  `RedshiftProperty.SEND_BUFFER_SIZE`

#### setPrepareThreshold

    public void setPrepareThreshold(int count)

Parameters:
  `count` - prepare threshold
See Also:
  `RedshiftProperty.PREPARE_THRESHOLD`

#### getPrepareThreshold

    public int getPrepareThreshold()

Returns:
  prepare threshold
See Also:
  `RedshiftProperty.PREPARE_THRESHOLD`

#### getPreparedStatementCacheQueries

    public int getPreparedStatementCacheQueries()

Returns:
  prepared statement cache size (number of statements per connection)
See Also:
  `RedshiftProperty.PREPARED_STATEMENT_CACHE_QUERIES`

#### setPreparedStatementCacheQueries

    public void setPreparedStatementCacheQueries(int cacheSize)

Parameters:
  `cacheSize` - prepared statement cache size (number of statements per connection)
See Also:
  `RedshiftProperty.PREPARED_STATEMENT_CACHE_QUERIES`

#### getPreparedStatementCacheSizeMiB

    public int getPreparedStatementCacheSizeMiB()

Returns:
  prepared statement cache size (number of megabytes per connection)
See Also:
  `RedshiftProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB`

#### setPreparedStatementCacheSizeMiB

    public void setPreparedStatementCacheSizeMiB(int cacheSize)

Parameters:
  `cacheSize` - statement cache size (number of megabytes per connection)
See Also:
  `RedshiftProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB`

#### getDatabaseMetadataCacheFields

    public int getDatabaseMetadataCacheFields()

Returns:
  database metadata cache fields size (number of fields cached per connection)
See Also:
  `RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS`

#### setDatabaseMetadataCacheFields

    public void setDatabaseMetadataCacheFields(int cacheSize)

Parameters:
  `cacheSize` - database metadata cache fields size (number of fields cached per connection)
See Also:
  `RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS`

#### getDatabaseMetadataCacheFieldsMiB

    public int getDatabaseMetadataCacheFieldsMiB()

Returns:
  database metadata cache fields size (number of megabytes per connection)
See Also:
  `RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS_MIB`

#### setDatabaseMetadataCacheFieldsMiB

    public void setDatabaseMetadataCacheFieldsMiB(int cacheSize)

Parameters:
  `cacheSize` - database metadata cache fields size (number of megabytes per connection)
See Also:
  `RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS_MIB`

#### setDefaultRowFetchSize

    public void setDefaultRowFetchSize(int fetchSize)

Parameters:
  `fetchSize` - default fetch size
See Also:
  `RedshiftProperty.DEFAULT_ROW_FETCH_SIZE`

#### getDefaultRowFetchSize

    public int getDefaultRowFetchSize()

Returns:
  default fetch size
See Also:
  `RedshiftProperty.DEFAULT_ROW_FETCH_SIZE`

#### setUnknownLength

    public void setUnknownLength(int unknownLength)

Parameters:
  `unknownLength` - unknown length
See Also:
  `RedshiftProperty.UNKNOWN_LENGTH`

#### getUnknownLength

    public int getUnknownLength()

Returns:
  unknown length
See Also:
  `RedshiftProperty.UNKNOWN_LENGTH`

#### setSocketTimeout

    public void setSocketTimeout(int seconds)

Parameters:
  `seconds` - socket timeout
See Also:
  `RedshiftProperty.SOCKET_TIMEOUT`

#### getSocketTimeout

    public int getSocketTimeout()

Returns:
  socket timeout
See Also:
  `RedshiftProperty.SOCKET_TIMEOUT`

#### setCancelSignalTimeout

    public void setCancelSignalTimeout(int seconds)

Parameters:
  `seconds` - timeout that is used for sending cancel command
See Also:
  `RedshiftProperty.CANCEL_SIGNAL_TIMEOUT`

#### getCancelSignalTimeout

    public int getCancelSignalTimeout()

Returns:
  timeout that is used for sending cancel command in seconds
See Also:
  `RedshiftProperty.CANCEL_SIGNAL_TIMEOUT`

#### setSsl

    public void setSsl(boolean enabled)

Parameters:
  `enabled` - if SSL is enabled
See Also:
  `RedshiftProperty.SSL`

#### getSsl

    public boolean getSsl()

Returns:
  true if SSL is enabled
See Also:
  `RedshiftProperty.SSL`

#### setSslfactory

    public void setSslfactory(String classname)

Parameters:
  `classname` - SSL factory class name
See Also:
  `RedshiftProperty.SSL_FACTORY`

#### getSslfactory

    public String getSslfactory()

Returns:
  SSL factory class name
See Also:
  `RedshiftProperty.SSL_FACTORY`

#### getSslMode

    public String getSslMode()

Returns:
  SSL mode
See Also:
  `RedshiftProperty.SSL_MODE`

#### setSslMode

    public void setSslMode(String mode)

Parameters:
  `mode` - SSL mode
See Also:
  `RedshiftProperty.SSL_MODE`

#### getSslFactoryArg

    public String getSslFactoryArg()

Returns:
  SSL mode
See Also:
  `RedshiftProperty.SSL_FACTORY_ARG`

#### setSslFactoryArg

    public void setSslFactoryArg(String arg)

Parameters:
  `arg` - argument forwarded to SSL factory
See Also:
  `RedshiftProperty.SSL_FACTORY_ARG`

#### getSslHostnameVerifier

    public String getSslHostnameVerifier()

Returns:
  argument forwarded to SSL factory
See Also:
  `RedshiftProperty.SSL_HOSTNAME_VERIFIER`

#### setSslHostnameVerifier

    public void setSslHostnameVerifier(String className)

Parameters:
  `className` - SSL hostname verifier
See Also:
  `RedshiftProperty.SSL_HOSTNAME_VERIFIER`

#### getSslCert

    public String getSslCert()

Returns:
  className SSL hostname verifier
See Also:
  `RedshiftProperty.SSL_CERT`

#### setSslCert

    public void setSslCert(String file)

Parameters:
  `file` - SSL certificate
See Also:
  `RedshiftProperty.SSL_CERT`

#### getSslKey

    public String getSslKey()

Returns:
  SSL certificate
See Also:
  `RedshiftProperty.SSL_KEY`

#### setSslKey

    public void setSslKey(String file)

Parameters:
  `file` - SSL key
See Also:
  `RedshiftProperty.SSL_KEY`

#### getSslRootCert

    public String getSslRootCert()

Returns:
  SSL root certificate
See Also:
  `RedshiftProperty.SSL_ROOT_CERT`

#### setSslRootCert

    public void setSslRootCert(String file)

Parameters:
  `file` - SSL root certificate
See Also:
  `RedshiftProperty.SSL_ROOT_CERT`

#### getSslPassword

    public String getSslPassword()

Returns:
  SSL password
See Also:
  `RedshiftProperty.SSL_PASSWORD`

#### setSslPassword

    public void setSslPassword(String password)

Parameters:
  `password` - SSL password
See Also:
  `RedshiftProperty.SSL_PASSWORD`

#### getSslPasswordCallback

    public String getSslPasswordCallback()

Returns:
  SSL password callback
See Also:
  `RedshiftProperty.SSL_PASSWORD_CALLBACK`

#### setSslPasswordCallback

    public void setSslPasswordCallback(String className)

Parameters:
  `className` - SSL password callback class name
See Also:
  `RedshiftProperty.SSL_PASSWORD_CALLBACK`

#### setApplicationName

    public void setApplicationName(String applicationName)

Parameters:
  `applicationName` - application name
See Also:
  `RedshiftProperty.APPLICATION_NAME`

#### getApplicationName

    public String getApplicationName()

Returns:
  application name
See Also:
  `RedshiftProperty.APPLICATION_NAME`

#### setTargetServerType

    public void setTargetServerType(String targetServerType)

Parameters:
  `targetServerType` - target server type
See Also:
  `RedshiftProperty.TARGET_SERVER_TYPE`

#### getTargetServerType

    public String getTargetServerType()

Returns:
  target server type
See Also:
  `RedshiftProperty.TARGET_SERVER_TYPE`

#### setLoadBalanceHosts

    public void setLoadBalanceHosts(boolean loadBalanceHosts)

Parameters:
  `loadBalanceHosts` - load balance hosts
See Also:
  `RedshiftProperty.LOAD_BALANCE_HOSTS`

#### getLoadBalanceHosts

    public boolean getLoadBalanceHosts()

Returns:
  load balance hosts
See Also:
  `RedshiftProperty.LOAD_BALANCE_HOSTS`

#### setHostRecheckSeconds

    public void setHostRecheckSeconds(int hostRecheckSeconds)

Parameters:
  `hostRecheckSeconds` - host recheck seconds
See Also:
  `RedshiftProperty.HOST_RECHECK_SECONDS`

#### getHostRecheckSeconds

    public int getHostRecheckSeconds()

Returns:
  host recheck seconds
See Also:
  `RedshiftProperty.HOST_RECHECK_SECONDS`

#### setTcpKeepAlive

    public void setTcpKeepAlive(boolean enabled)

Parameters:
  `enabled` - if TCP keep alive should be enabled
See Also:
  `RedshiftProperty.TCP_KEEP_ALIVE`

#### getTcpKeepAlive

    public boolean getTcpKeepAlive()

Returns:
  true if TCP keep alive is enabled
See Also:
  `RedshiftProperty.TCP_KEEP_ALIVE`

#### setBinaryTransfer

    public void setBinaryTransfer(boolean enabled)

Parameters:
  `enabled` - if binary transfer should be enabled
See Also:
  `RedshiftProperty.BINARY_TRANSFER`

#### getBinaryTransfer

    public boolean getBinaryTransfer()

Returns:
  true if binary transfer is enabled
See Also:
  `RedshiftProperty.BINARY_TRANSFER`

#### setBinaryTransferEnable

    public void setBinaryTransferEnable(String oidList)

Parameters:
  `oidList` - list of OIDs that are allowed to use binary transfer
See Also:
  `RedshiftProperty.BINARY_TRANSFER_ENABLE`

#### getBinaryTransferEnable

    public String getBinaryTransferEnable()

Returns:
  list of OIDs that are allowed to use binary transfer
See Also:
  `RedshiftProperty.BINARY_TRANSFER_ENABLE`

#### setBinaryTransferDisable

    public void setBinaryTransferDisable(String oidList)

Parameters:
  `oidList` - list of OIDs that are not allowed to use binary transfer
See Also:
  `RedshiftProperty.BINARY_TRANSFER_DISABLE`

#### getBinaryTransferDisable

    public String getBinaryTransferDisable()

Returns:
  list of OIDs that are not allowed to use binary transfer
See Also:
  `RedshiftProperty.BINARY_TRANSFER_DISABLE`

#### getStringType

    public String getStringType()

Returns:
  string type
See Also:
  `RedshiftProperty.STRING_TYPE`

#### setStringType

    public void setStringType(String stringType)

Parameters:
  `stringType` - string type
See Also:
  `RedshiftProperty.STRING_TYPE`

#### isColumnSanitiserDisabled

    public boolean isColumnSanitiserDisabled()

Returns:
  true if column sanitizer is disabled
See Also:
  `RedshiftProperty.DISABLE_COLUMN_SANITISER`

#### getDisableColumnSanitiser

    public boolean getDisableColumnSanitiser()

Returns:
  true if column sanitizer is disabled
See Also:
  `RedshiftProperty.DISABLE_COLUMN_SANITISER`

#### setDisableColumnSanitiser

    public void setDisableColumnSanitiser(boolean disableColumnSanitiser)

Parameters:
  `disableColumnSanitiser` - if column sanitizer should be disabled
See Also:
  `RedshiftProperty.DISABLE_COLUMN_SANITISER`

#### getCurrentSchema

    public String getCurrentSchema()

Returns:
  current schema
See Also:
  `RedshiftProperty.CURRENT_SCHEMA`

#### setCurrentSchema

    public void setCurrentSchema(String currentSchema)

Parameters:
  `currentSchema` - current schema
See Also:
  `RedshiftProperty.CURRENT_SCHEMA`

#### getReadOnly

    public boolean getReadOnly()

Returns:
  true if connection is readonly
See Also:
  `RedshiftProperty.READ_ONLY`

#### setReadOnly

    public void setReadOnly(boolean readOnly)

Parameters:
  `readOnly` - if connection should be readonly
See Also:
  `RedshiftProperty.READ_ONLY`

#### getReadOnlyMode

    public String getReadOnlyMode()

Returns:
  The behavior when set read only
See Also:
  `RedshiftProperty.READ_ONLY_MODE`

#### setReadOnlyMode

    public void setReadOnlyMode(String mode)

Parameters:
  `mode` - the behavior when set read only
See Also:
  `RedshiftProperty.READ_ONLY_MODE`

#### getLogUnclosedConnections

    public boolean getLogUnclosedConnections()

Returns:
  true if driver should log unclosed connections
See Also:
  `RedshiftProperty.LOG_UNCLOSED_CONNECTIONS`

#### setLogUnclosedConnections

    public void setLogUnclosedConnections(boolean enabled)

Parameters:
  `enabled` - true if driver should log unclosed connections
See Also:
  `RedshiftProperty.LOG_UNCLOSED_CONNECTIONS`

#### getLogServerErrorDetail

    public boolean getLogServerErrorDetail()

Returns:
  true if driver should log include detail in server error messages
See Also:
  `RedshiftProperty.LOG_SERVER_ERROR_DETAIL`

#### setLogServerErrorDetail

    public void setLogServerErrorDetail(boolean enabled)

Parameters:
  `enabled` - true if driver should include detail in server error messages
See Also:
  `RedshiftProperty.LOG_SERVER_ERROR_DETAIL`

#### getAssumeMinServerVersion

    public String getAssumeMinServerVersion()

Returns:
  assumed minimal server version
See Also:
  `RedshiftProperty.ASSUME_MIN_SERVER_VERSION`

#### setAssumeMinServerVersion

    public void setAssumeMinServerVersion(String minVersion)

Parameters:
  `minVersion` - assumed minimal server version
See Also:
  `RedshiftProperty.ASSUME_MIN_SERVER_VERSION`

#### getJaasApplicationName

    public String getJaasApplicationName()

Returns:
  JAAS application name
See Also:
  `RedshiftProperty.JAAS_APPLICATION_NAME`

#### setJaasApplicationName

    public void setJaasApplicationName(String name)

Parameters:
  `name` - JAAS application name
See Also:
  `RedshiftProperty.JAAS_APPLICATION_NAME`

#### getJaasLogin

    public boolean getJaasLogin()

Returns:
  true if perform JAAS login before GSS authentication
See Also:
  `RedshiftProperty.JAAS_LOGIN`

#### setJaasLogin

    public void setJaasLogin(boolean doLogin)

Parameters:
  `doLogin` - true if perform JAAS login before GSS authentication
See Also:
  `RedshiftProperty.JAAS_LOGIN`

#### getKerberosServerName

    public String getKerberosServerName()

Returns:
  Kerberos server name
See Also:
  `RedshiftProperty.KERBEROS_SERVER_NAME`

#### setKerberosServerName

    public void setKerberosServerName(String serverName)

Parameters:
  `serverName` - Kerberos server name
See Also:
  `RedshiftProperty.KERBEROS_SERVER_NAME`

#### getUseSpNego

    public boolean getUseSpNego()

Returns:
  true if use SPNEGO
See Also:
  `RedshiftProperty.USE_SPNEGO`

#### setUseSpNego

    public void setUseSpNego(boolean use)

Parameters:
  `use` - true if use SPNEGO
See Also:
  `RedshiftProperty.USE_SPNEGO`

#### getGssLib

    public String getGssLib()

Returns:
  GSS mode: auto, sspi, or gssapi
See Also:
  `RedshiftProperty.GSS_LIB`

#### setGssLib

    public void setGssLib(String lib)

Parameters:
  `lib` - GSS mode: auto, sspi, or gssapi
See Also:
  `RedshiftProperty.GSS_LIB`

#### getSspiServiceClass

    public String getSspiServiceClass()

Returns:
  SSPI service class
See Also:
  `RedshiftProperty.SSPI_SERVICE_CLASS`

#### setSspiServiceClass

    public void setSspiServiceClass(String serviceClass)

Parameters:
  `serviceClass` - SSPI service class
See Also:
  `RedshiftProperty.SSPI_SERVICE_CLASS`

#### getAllowEncodingChanges

    public boolean getAllowEncodingChanges()

Returns:
  if connection allows encoding changes
See Also:
  `RedshiftProperty.ALLOW_ENCODING_CHANGES`

#### setAllowEncodingChanges

    public void setAllowEncodingChanges(boolean allow)

Parameters:
  `allow` - if connection allows encoding changes
See Also:
  `RedshiftProperty.ALLOW_ENCODING_CHANGES`

#### getSocketFactory

    public String getSocketFactory()

Returns:
  socket factory class name
See Also:
  `RedshiftProperty.SOCKET_FACTORY`

#### setSocketFactory

    public void setSocketFactory(String socketFactoryClassName)

Parameters:
  `socketFactoryClassName` - socket factory class name
See Also:
  `RedshiftProperty.SOCKET_FACTORY`

#### getSocketFactoryArg

    public String getSocketFactoryArg()

Returns:
  socket factory argument
See Also:
  `RedshiftProperty.SOCKET_FACTORY_ARG`

#### setSocketFactoryArg

    public void setSocketFactoryArg(String socketFactoryArg)

Parameters:
  `socketFactoryArg` - socket factory argument
See Also:
  `RedshiftProperty.SOCKET_FACTORY_ARG`

#### setReplication

    public void setReplication(String replication)

Parameters:
  `replication` - set to 'database' for logical replication or 'true' for physical replication
See Also:
  `RedshiftProperty.REPLICATION`

#### getEscapeSyntaxCallMode

    public String getEscapeSyntaxCallMode()

Returns:
  'select', "callIfNoReturn', or 'call'
See Also:
  `RedshiftProperty.ESCAPE_SYNTAX_CALL_MODE`

#### setEscapeSyntaxCallMode

    public void setEscapeSyntaxCallMode(String callMode)

Parameters:
  `callMode` - the call mode to use for JDBC escape call syntax
See Also:
  `RedshiftProperty.ESCAPE_SYNTAX_CALL_MODE`

#### getReplication

    public String getReplication()

Returns:
  null, 'database', or 'true
See Also:
  `RedshiftProperty.REPLICATION`

#### getLoggerLevel

    public String getLoggerLevel()

Returns:
  Logger Level of the JDBC Driver
See Also:
  `RedshiftProperty.LOGGER_LEVEL`

#### setLoggerLevel

    public void setLoggerLevel(String loggerLevel)

Parameters:
  `loggerLevel` - logger level of the JDBC Driver
See Also:
  `RedshiftProperty.LOGGER_LEVEL`

#### setLogLevel

    public void setLogLevel(String level)

Added for backward compatibility.

Parameters:
  `level` - logger level of the JDBC Driver
See Also:
  `RedshiftProperty.LOGGER_LEVEL`

#### getLoggerFile

    public String getLoggerFile()

Returns:
  File output of the Logger.
See Also:
  `RedshiftProperty.LOGGER_FILE`

#### getLogDirectory

    public String getLogDirectory()

#### setLoggerFile

    public void setLoggerFile(String loggerFile)

Parameters:
  `loggerFile` - File output of the Logger.
See Also:
  `RedshiftProperty.LOGGER_LEVEL`

#### setLogDirectory

    public void setLogDirectory(String logDirectory)

Added for backward compatibility.

Parameters:
  `logDirectory` - output directory of the Logger.

#### getUrl

    public String getUrl()

Generates a `DriverManager` URL from the other properties supplied.

Returns:
  `DriverManager` URL from the other properties supplied

#### getURL

    public String getURL()

Generates a `DriverManager` URL from the other properties supplied.

Returns:
  `DriverManager` URL from the other properties supplied

#### setUrl

    public void setUrl(String url)

Sets properties from a `DriverManager` URL.

Parameters:
  `url` - properties to set

#### setURL

    public void setURL(String url)

Sets properties from a `DriverManager` URL. Added to follow convention used in other DBMS.

Parameters:
  `url` - properties to set

#### getProperty

    public String getProperty(String name)
                       throws SQLException

Throws:
  `SQLException`

#### setProperty

    public void setProperty(String name,
                            String value)
                     throws SQLException

Throws:
  `SQLException`

#### getProperty

    public String getProperty(RedshiftProperty property)

#### setProperty

    public void setProperty(RedshiftProperty property,
                            String value)

#### createReference

    protected Reference createReference()

Generates a reference using the appropriate object factory.

Returns:
  reference using the appropriate object factory

#### getReference

    public Reference getReference()
                           throws NamingException

Specified by:
  `getReference` in interface `Referenceable`
Throws:
  `NamingException`

#### setFromReference

    public void setFromReference(Reference ref)

#### writeBaseObject

    protected void writeBaseObject(ObjectOutputStream out)
                            throws IOException

Throws:
  `IOException`

#### readBaseObject

    protected void readBaseObject(ObjectInputStream in)
                           throws IOException,
                                  ClassNotFoundException

Throws:
  `IOException`
  `ClassNotFoundException`

#### initializeFrom

    public void initializeFrom(BaseDataSource source)
                        throws IOException,
                               ClassNotFoundException

Throws:
  `IOException`
  `ClassNotFoundException`

#### getPreferQueryMode

    public PreferQueryMode getPreferQueryMode()

Returns:
  preferred query execution mode
See Also:
  `RedshiftProperty.PREFER_QUERY_MODE`

#### setPreferQueryMode

    public void setPreferQueryMode(PreferQueryMode preferQueryMode)

Parameters:
  `preferQueryMode` - extended, simple, extendedForPrepared, or extendedCacheEverything
See Also:
  `RedshiftProperty.PREFER_QUERY_MODE`

#### getAutosave

    public AutoSave getAutosave()

Returns:
  connection configuration regarding automatic per-query savepoints
See Also:
  `RedshiftProperty.AUTOSAVE`

#### setAutosave

    public void setAutosave(AutoSave autoSave)

Parameters:
  `autoSave` - connection configuration regarding automatic per-query savepoints
See Also:
  `RedshiftProperty.AUTOSAVE`

#### isRaiseExceptionOnSilentRollback

    public boolean isRaiseExceptionOnSilentRollback()

Returns:
  connection configuration regarding throwing exception from commit if database rolls back the transaction
See Also:
  `RedshiftProperty.RAISE_EXCEPTION_ON_SILENT_ROLLBACK`

#### setRaiseExceptionOnSilentRollback

    public void setRaiseExceptionOnSilentRollback(boolean raiseExceptionOnSilentRollback)

Parameters:
  `raiseExceptionOnSilentRollback` - if the database should throw exception if commit silently rolls back
See Also:
  `RedshiftProperty.RAISE_EXCEPTION_ON_SILENT_ROLLBACK`

#### getCleanupSavepoints

    public boolean getCleanupSavepoints()

see RedshiftProperty#CLEANUP_SAVEPOINTS

Returns:
  boolean indicating property set

#### setCleanupSavepoints

    public void setCleanupSavepoints(boolean cleanupSavepoints)

see RedshiftProperty#CLEANUP_SAVEPOINTS

Parameters:
  `cleanupSavepoints` - will cleanup savepoints after a successful transaction

#### getReWriteBatchedInserts

    public boolean getReWriteBatchedInserts()

Returns:
  boolean indicating property is enabled or not.
See Also:
  `RedshiftProperty.REWRITE_BATCHED_INSERTS`

#### setReWriteBatchedInserts

    public void setReWriteBatchedInserts(boolean reWrite)

Parameters:
  `reWrite` - boolean value to set the property in the properties collection
See Also:
  `RedshiftProperty.REWRITE_BATCHED_INSERTS`

#### getHideUnprivilegedObjects

    public boolean getHideUnprivilegedObjects()

Returns:
  boolean indicating property is enabled or not.
See Also:
  `RedshiftProperty.HIDE_UNPRIVILEGED_OBJECTS`

#### setHideUnprivilegedObjects

    public void setHideUnprivilegedObjects(boolean hideUnprivileged)

Parameters:
  `hideUnprivileged` - boolean value to set the property in the properties collection
See Also:
  `RedshiftProperty.HIDE_UNPRIVILEGED_OBJECTS`

#### getMaxResultBuffer

    public String getMaxResultBuffer()

#### setMaxResultBuffer

    public void setMaxResultBuffer(String maxResultBuffer)

#### getParentLogger

    public Logger getParentLogger()
                           throws SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `CommonDataSource`
Throws:
  `SQLFeatureNotSupportedException`

#### isSsl

    public boolean isSsl()

#### getSslfactoryarg

    public String getSslfactoryarg()

#### setSslfactoryarg

    public void setSslfactoryarg(String arg)

#### getSslcert

    public String getSslcert()

#### setSslcert

    public void setSslcert(String file)

#### getSslmode

    public String getSslmode()

#### setSslmode

    public void setSslmode(String mode)

#### getSslhostnameverifier

    public String getSslhostnameverifier()

#### setSslhostnameverifier

    public void setSslhostnameverifier(String className)

#### getSslkey

    public String getSslkey()

#### setSslkey

    public void setSslkey(String file)

#### getSslrootcert

    public String getSslrootcert()

#### setSslrootcert

    public void setSslrootcert(String file)

#### getSslpasswordcallback

    public String getSslpasswordcallback()

#### setSslpasswordcallback

    public void setSslpasswordcallback(String className)

#### getSslpassword

    public String getSslpassword()

#### setSslpassword

    public void setSslpassword(String sslpassword)

#### getRecvBufferSize

    public int getRecvBufferSize()

#### setRecvBufferSize

    public void setRecvBufferSize(int nbytes)

#### isAllowEncodingChanges

    public boolean isAllowEncodingChanges()

#### isLogUnclosedConnections

    public boolean isLogUnclosedConnections()

#### isTcpKeepAlive

    public boolean isTcpKeepAlive()

#### isReadOnly

    public boolean isReadOnly()

#### isDisableColumnSanitiser

    public boolean isDisableColumnSanitiser()

#### isLoadBalanceHosts

    public boolean isLoadBalanceHosts()

#### isCleanupSavePoints

    public boolean isCleanupSavePoints()

#### setCleanupSavePoints

    public void setCleanupSavePoints(boolean cleanupSavepoints)

#### isReWriteBatchedInserts

    public boolean isReWriteBatchedInserts()