public abstract class BaseDataSource extends Object implements CommonDataSource, Referenceable
| Constructor and Description |
|---|
BaseDataSource() |
public Connection getConnection() throws SQLException
SQLException - Occurs when the database connection cannot be established.public Connection getConnection(String user, String password) throws SQLException
user - userpassword - passwordSQLException - Occurs when the database connection cannot be established.public PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter printWriter)
setLogWriter in interface CommonDataSourceprintWriter - Not used@Deprecated public String getServerName()
getServerNames()public String[] getServerNames()
@Deprecated public void setServerName(String serverName)
setServerNames(String[])localhost.serverName - name of the host the Redshift database is running onpublic void setServerNames(String[] serverNames)
localhost.serverNames - name of the host(s) the Redshift database is running onpublic String getDatabaseName()
public void setDatabaseName(String databaseName)
databaseName - name of the Redshift databasepublic abstract String getDescription()
public String getUser()
public String getUserID()
public void setUser(String user)
user - user to connect as by defaultpublic void setUserID(String id)
id - user to connect as by defaultpublic String getPassword()
public void setPassword(String password)
password - password to connect with by default@Deprecated public int getPortNumber()
getPortNumbers()public int[] getPortNumbers()
@Deprecated public void setPortNumber(int portNumber)
setPortNumbers(int[])portNumber - port which the Redshift server is listening on for TCP/IPpublic void setPortNumbers(int[] portNumbers)
portNumbers - port(s) which the Redshift server is listening on for TCP/IPpublic String getOptions()
public void setOptions(String options)
options - string to set options topublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourceRedshiftProperty.LOGIN_TIMEOUTpublic void setLoginTimeout(int loginTimeout)
setLoginTimeout in interface CommonDataSourceloginTimeout - login timeoutRedshiftProperty.LOGIN_TIMEOUTpublic int getConnectTimeout()
RedshiftProperty.CONNECT_TIMEOUTpublic void setConnectTimeout(int connectTimeout)
connectTimeout - connect timeoutRedshiftProperty.CONNECT_TIMEOUTpublic int getProtocolVersion()
RedshiftProperty.PROTOCOL_VERSIONpublic void setProtocolVersion(int protocolVersion)
protocolVersion - protocol versionRedshiftProperty.PROTOCOL_VERSIONpublic int getReceiveBufferSize()
RedshiftProperty.RECEIVE_BUFFER_SIZEpublic void setReceiveBufferSize(int nbytes)
nbytes - receive buffer sizeRedshiftProperty.RECEIVE_BUFFER_SIZEpublic int getSendBufferSize()
RedshiftProperty.SEND_BUFFER_SIZEpublic void setSendBufferSize(int nbytes)
nbytes - send buffer sizeRedshiftProperty.SEND_BUFFER_SIZEpublic void setPrepareThreshold(int count)
count - prepare thresholdRedshiftProperty.PREPARE_THRESHOLDpublic int getPrepareThreshold()
RedshiftProperty.PREPARE_THRESHOLDpublic int getPreparedStatementCacheQueries()
RedshiftProperty.PREPARED_STATEMENT_CACHE_QUERIESpublic void setPreparedStatementCacheQueries(int cacheSize)
cacheSize - prepared statement cache size (number of statements per connection)RedshiftProperty.PREPARED_STATEMENT_CACHE_QUERIESpublic int getPreparedStatementCacheSizeMiB()
RedshiftProperty.PREPARED_STATEMENT_CACHE_SIZE_MIBpublic void setPreparedStatementCacheSizeMiB(int cacheSize)
cacheSize - statement cache size (number of megabytes per connection)RedshiftProperty.PREPARED_STATEMENT_CACHE_SIZE_MIBpublic int getDatabaseMetadataCacheFields()
RedshiftProperty.DATABASE_METADATA_CACHE_FIELDSpublic void setDatabaseMetadataCacheFields(int cacheSize)
cacheSize - database metadata cache fields size (number of fields cached per connection)RedshiftProperty.DATABASE_METADATA_CACHE_FIELDSpublic int getDatabaseMetadataCacheFieldsMiB()
RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS_MIBpublic void setDatabaseMetadataCacheFieldsMiB(int cacheSize)
cacheSize - database metadata cache fields size (number of megabytes per connection)RedshiftProperty.DATABASE_METADATA_CACHE_FIELDS_MIBpublic void setDefaultRowFetchSize(int fetchSize)
fetchSize - default fetch sizeRedshiftProperty.DEFAULT_ROW_FETCH_SIZEpublic int getDefaultRowFetchSize()
RedshiftProperty.DEFAULT_ROW_FETCH_SIZEpublic void setUnknownLength(int unknownLength)
unknownLength - unknown lengthRedshiftProperty.UNKNOWN_LENGTHpublic int getUnknownLength()
RedshiftProperty.UNKNOWN_LENGTHpublic void setSocketTimeout(int seconds)
seconds - socket timeoutRedshiftProperty.SOCKET_TIMEOUTpublic int getSocketTimeout()
RedshiftProperty.SOCKET_TIMEOUTpublic void setCancelSignalTimeout(int seconds)
seconds - timeout that is used for sending cancel commandRedshiftProperty.CANCEL_SIGNAL_TIMEOUTpublic int getCancelSignalTimeout()
RedshiftProperty.CANCEL_SIGNAL_TIMEOUTpublic void setSsl(boolean enabled)
enabled - if SSL is enabledRedshiftProperty.SSLpublic boolean getSsl()
RedshiftProperty.SSLpublic void setSslfactory(String classname)
classname - SSL factory class nameRedshiftProperty.SSL_FACTORYpublic String getSslfactory()
RedshiftProperty.SSL_FACTORYpublic String getSslMode()
RedshiftProperty.SSL_MODEpublic void setSslMode(String mode)
mode - SSL modeRedshiftProperty.SSL_MODEpublic String getSslFactoryArg()
RedshiftProperty.SSL_FACTORY_ARGpublic void setSslFactoryArg(String arg)
arg - argument forwarded to SSL factoryRedshiftProperty.SSL_FACTORY_ARGpublic String getSslHostnameVerifier()
RedshiftProperty.SSL_HOSTNAME_VERIFIERpublic void setSslHostnameVerifier(String className)
className - SSL hostname verifierRedshiftProperty.SSL_HOSTNAME_VERIFIERpublic String getSslCert()
RedshiftProperty.SSL_CERTpublic void setSslCert(String file)
file - SSL certificateRedshiftProperty.SSL_CERTpublic String getSslKey()
RedshiftProperty.SSL_KEYpublic void setSslKey(String file)
file - SSL keyRedshiftProperty.SSL_KEYpublic String getSslRootCert()
RedshiftProperty.SSL_ROOT_CERTpublic void setSslRootCert(String file)
file - SSL root certificateRedshiftProperty.SSL_ROOT_CERTpublic String getSslPassword()
RedshiftProperty.SSL_PASSWORDpublic void setSslPassword(String password)
password - SSL passwordRedshiftProperty.SSL_PASSWORDpublic String getSslPasswordCallback()
RedshiftProperty.SSL_PASSWORD_CALLBACKpublic void setSslPasswordCallback(String className)
className - SSL password callback class nameRedshiftProperty.SSL_PASSWORD_CALLBACKpublic void setApplicationName(String applicationName)
applicationName - application nameRedshiftProperty.APPLICATION_NAMEpublic String getApplicationName()
RedshiftProperty.APPLICATION_NAMEpublic void setTargetServerType(String targetServerType)
targetServerType - target server typeRedshiftProperty.TARGET_SERVER_TYPEpublic String getTargetServerType()
RedshiftProperty.TARGET_SERVER_TYPEpublic void setLoadBalanceHosts(boolean loadBalanceHosts)
loadBalanceHosts - load balance hostsRedshiftProperty.LOAD_BALANCE_HOSTSpublic boolean getLoadBalanceHosts()
RedshiftProperty.LOAD_BALANCE_HOSTSpublic void setHostRecheckSeconds(int hostRecheckSeconds)
hostRecheckSeconds - host recheck secondsRedshiftProperty.HOST_RECHECK_SECONDSpublic int getHostRecheckSeconds()
RedshiftProperty.HOST_RECHECK_SECONDSpublic void setTcpKeepAlive(boolean enabled)
enabled - if TCP keep alive should be enabledRedshiftProperty.TCP_KEEP_ALIVEpublic boolean getTcpKeepAlive()
RedshiftProperty.TCP_KEEP_ALIVEpublic void setBinaryTransfer(boolean enabled)
enabled - if binary transfer should be enabledRedshiftProperty.BINARY_TRANSFERpublic boolean getBinaryTransfer()
RedshiftProperty.BINARY_TRANSFERpublic void setBinaryTransferEnable(String oidList)
oidList - list of OIDs that are allowed to use binary transferRedshiftProperty.BINARY_TRANSFER_ENABLEpublic String getBinaryTransferEnable()
RedshiftProperty.BINARY_TRANSFER_ENABLEpublic void setBinaryTransferDisable(String oidList)
oidList - list of OIDs that are not allowed to use binary transferRedshiftProperty.BINARY_TRANSFER_DISABLEpublic String getBinaryTransferDisable()
RedshiftProperty.BINARY_TRANSFER_DISABLEpublic String getStringType()
RedshiftProperty.STRING_TYPEpublic void setStringType(String stringType)
stringType - string typeRedshiftProperty.STRING_TYPEpublic boolean isColumnSanitiserDisabled()
RedshiftProperty.DISABLE_COLUMN_SANITISERpublic boolean getDisableColumnSanitiser()
RedshiftProperty.DISABLE_COLUMN_SANITISERpublic void setDisableColumnSanitiser(boolean disableColumnSanitiser)
disableColumnSanitiser - if column sanitizer should be disabledRedshiftProperty.DISABLE_COLUMN_SANITISERpublic String getCurrentSchema()
RedshiftProperty.CURRENT_SCHEMApublic void setCurrentSchema(String currentSchema)
currentSchema - current schemaRedshiftProperty.CURRENT_SCHEMApublic boolean getReadOnly()
RedshiftProperty.READ_ONLYpublic void setReadOnly(boolean readOnly)
readOnly - if connection should be readonlyRedshiftProperty.READ_ONLYpublic String getReadOnlyMode()
RedshiftProperty.READ_ONLY_MODEpublic void setReadOnlyMode(String mode)
mode - the behavior when set read onlyRedshiftProperty.READ_ONLY_MODEpublic boolean getLogUnclosedConnections()
RedshiftProperty.LOG_UNCLOSED_CONNECTIONSpublic void setLogUnclosedConnections(boolean enabled)
enabled - true if driver should log unclosed connectionsRedshiftProperty.LOG_UNCLOSED_CONNECTIONSpublic boolean getLogServerErrorDetail()
RedshiftProperty.LOG_SERVER_ERROR_DETAILpublic void setLogServerErrorDetail(boolean enabled)
enabled - true if driver should include detail in server error messagesRedshiftProperty.LOG_SERVER_ERROR_DETAILpublic String getAssumeMinServerVersion()
RedshiftProperty.ASSUME_MIN_SERVER_VERSIONpublic void setAssumeMinServerVersion(String minVersion)
minVersion - assumed minimal server versionRedshiftProperty.ASSUME_MIN_SERVER_VERSIONpublic String getJaasApplicationName()
RedshiftProperty.JAAS_APPLICATION_NAMEpublic void setJaasApplicationName(String name)
name - JAAS application nameRedshiftProperty.JAAS_APPLICATION_NAMEpublic boolean getJaasLogin()
RedshiftProperty.JAAS_LOGINpublic void setJaasLogin(boolean doLogin)
doLogin - true if perform JAAS login before GSS authenticationRedshiftProperty.JAAS_LOGINpublic String getKerberosServerName()
RedshiftProperty.KERBEROS_SERVER_NAMEpublic void setKerberosServerName(String serverName)
serverName - Kerberos server nameRedshiftProperty.KERBEROS_SERVER_NAMEpublic boolean getUseSpNego()
RedshiftProperty.USE_SPNEGOpublic void setUseSpNego(boolean use)
use - true if use SPNEGORedshiftProperty.USE_SPNEGOpublic String getGssLib()
RedshiftProperty.GSS_LIBpublic void setGssLib(String lib)
lib - GSS mode: auto, sspi, or gssapiRedshiftProperty.GSS_LIBpublic String getSspiServiceClass()
RedshiftProperty.SSPI_SERVICE_CLASSpublic void setSspiServiceClass(String serviceClass)
serviceClass - SSPI service classRedshiftProperty.SSPI_SERVICE_CLASSpublic boolean getAllowEncodingChanges()
RedshiftProperty.ALLOW_ENCODING_CHANGESpublic void setAllowEncodingChanges(boolean allow)
allow - if connection allows encoding changesRedshiftProperty.ALLOW_ENCODING_CHANGESpublic String getSocketFactory()
RedshiftProperty.SOCKET_FACTORYpublic void setSocketFactory(String socketFactoryClassName)
socketFactoryClassName - socket factory class nameRedshiftProperty.SOCKET_FACTORYpublic String getSocketFactoryArg()
RedshiftProperty.SOCKET_FACTORY_ARGpublic void setSocketFactoryArg(String socketFactoryArg)
socketFactoryArg - socket factory argumentRedshiftProperty.SOCKET_FACTORY_ARGpublic void setReplication(String replication)
replication - set to 'database' for logical replication or 'true' for physical replicationRedshiftProperty.REPLICATIONpublic String getEscapeSyntaxCallMode()
RedshiftProperty.ESCAPE_SYNTAX_CALL_MODEpublic void setEscapeSyntaxCallMode(String callMode)
callMode - the call mode to use for JDBC escape call syntaxRedshiftProperty.ESCAPE_SYNTAX_CALL_MODEpublic String getReplication()
RedshiftProperty.REPLICATIONpublic String getLogLevel()
RedshiftProperty.LOG_LEVELpublic void setLogLevel(String level)
level - Log Level of the JDBC DriverRedshiftProperty.LOG_LEVELpublic String getLogDirectory()
public void setLogDirectory(String logDirectory)
logDirectory - output directory of the Logger.public String getUrl()
DriverManager URL from the other properties supplied.DriverManager URL from the other properties suppliedpublic String getURL()
DriverManager URL from the other properties supplied.DriverManager URL from the other properties suppliedpublic void setUrl(String url) throws RedshiftException
DriverManager URL.url - properties to setRedshiftExceptionpublic void setURL(String url) throws RedshiftException
DriverManager URL.
Added to follow convention used in other DBMS.url - properties to setRedshiftExceptionpublic String getProperty(String name) throws SQLException
SQLExceptionpublic void setProperty(String name, String value) throws SQLException
SQLExceptionpublic String getProperty(RedshiftProperty property)
public void setProperty(RedshiftProperty property, String value)
protected Reference createReference()
public Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionpublic void setFromReference(Reference ref)
protected void writeBaseObject(ObjectOutputStream out) throws IOException
IOExceptionprotected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic void initializeFrom(BaseDataSource source) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic PreferQueryMode getPreferQueryMode()
RedshiftProperty.PREFER_QUERY_MODEpublic void setPreferQueryMode(PreferQueryMode preferQueryMode)
preferQueryMode - extended, simple, extendedForPrepared, or extendedCacheEverythingRedshiftProperty.PREFER_QUERY_MODEpublic AutoSave getAutosave()
RedshiftProperty.AUTOSAVEpublic void setAutosave(AutoSave autoSave)
autoSave - connection configuration regarding automatic per-query savepointsRedshiftProperty.AUTOSAVEpublic boolean isRaiseExceptionOnSilentRollback()
RedshiftProperty.RAISE_EXCEPTION_ON_SILENT_ROLLBACKpublic void setRaiseExceptionOnSilentRollback(boolean raiseExceptionOnSilentRollback)
raiseExceptionOnSilentRollback - if the database should throw exception if commit silently rolls backRedshiftProperty.RAISE_EXCEPTION_ON_SILENT_ROLLBACKpublic boolean getCleanupSavepoints()
public void setCleanupSavepoints(boolean cleanupSavepoints)
cleanupSavepoints - will cleanup savepoints after a successful transactionpublic boolean getReWriteBatchedInserts()
RedshiftProperty.REWRITE_BATCHED_INSERTSpublic void setReWriteBatchedInserts(boolean reWrite)
reWrite - boolean value to set the property in the properties collectionRedshiftProperty.REWRITE_BATCHED_INSERTSpublic boolean getHideUnprivilegedObjects()
RedshiftProperty.HIDE_UNPRIVILEGED_OBJECTSpublic void setHideUnprivilegedObjects(boolean hideUnprivileged)
hideUnprivileged - boolean value to set the property in the properties collectionRedshiftProperty.HIDE_UNPRIVILEGED_OBJECTSpublic String getMaxResultBuffer()
public void setMaxResultBuffer(String maxResultBuffer)
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic boolean isSsl()
public String getSslfactoryarg()
public void setSslfactoryarg(String arg)
public String getSslcert()
public void setSslcert(String file)
public String getSslmode()
public void setSslmode(String mode)
public String getSslhostnameverifier()
public void setSslhostnameverifier(String className)
public String getSslkey()
public void setSslkey(String file)
public String getSslrootcert()
public void setSslrootcert(String file)
public String getSslpasswordcallback()
public void setSslpasswordcallback(String className)
public String getSslpassword()
public void setSslpassword(String sslpassword)
public int getRecvBufferSize()
public void setRecvBufferSize(int nbytes)
public boolean isAllowEncodingChanges()
public boolean isLogUnclosedConnections()
public boolean isTcpKeepAlive()
public boolean isReadOnly()
public boolean isDisableColumnSanitiser()
public boolean isLoadBalanceHosts()
public boolean isCleanupSavePoints()
public void setCleanupSavePoints(boolean cleanupSavepoints)
public boolean isReWriteBatchedInserts()
Copyright © 2024 Amazon.com Inc.. All rights reserved.