public abstract class BaseDataSource extends Object implements CommonDataSource, Referenceable
| Constructor and Description |
|---|
BaseDataSource() |
| Modifier and Type | Method and Description |
|---|---|
protected Reference |
createReference()
Generates a reference using the appropriate object factory.
|
boolean |
getAcceptAwsProtocolOnly() |
boolean |
getAdaptiveFetch() |
int |
getAdaptiveFetchMaximum() |
int |
getAdaptiveFetchMinimum() |
boolean |
getAllowEncodingChanges() |
String |
getApplicationName() |
@Nullable String |
getAssumeMinServerVersion() |
AutoSave |
getAutosave() |
boolean |
getBinaryTransfer() |
String |
getBinaryTransferDisable() |
String |
getBinaryTransferEnable() |
int |
getCancelSignalTimeout() |
boolean |
getCleanupSavepoints()
see PGProperty#CLEANUP_SAVEPOINTS
|
@Nullable String |
getClusterId() |
@Nullable String |
getClusterInstanceHostPattern() |
int |
getClusterTopologyRefreshRateMs() |
Connection |
getConnection()
Gets a connection to the PostgreSQL database.
|
Connection |
getConnection(@Nullable String user,
@Nullable String password)
Gets a connection to the PostgreSQL database.
|
int |
getConnectTimeout() |
@Nullable String |
getCurrentSchema() |
int |
getDatabaseMetadataCacheFields() |
int |
getDatabaseMetadataCacheFieldsMiB() |
@Nullable String |
getDatabaseName()
Gets the name of the PostgreSQL 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() |
boolean |
getEnableClusterAwareFailover() |
String |
getEscapeSyntaxCallMode() |
int |
getFailoverClusterTopologyRefreshRateMs() |
int |
getFailoverReaderConnectTimeoutMs() |
int |
getFailoverTimeoutMs() |
int |
getFailoverWriterReconnectIntervalMs() |
boolean |
getGatherPerfMetrics() |
String |
getGssEncMode() |
@Nullable String |
getGssLib() |
boolean |
getHideUnprivilegedObjects() |
int |
getHostRecheckSeconds() |
@Nullable String |
getJaasApplicationName() |
boolean |
getJaasLogin() |
@Nullable String |
getKerberosServerName() |
boolean |
getLoadBalanceHosts() |
@Nullable String |
getLoggerFile() |
@Nullable String |
getLoggerLevel() |
int |
getLoginTimeout() |
boolean |
getLogServerErrorDetail() |
boolean |
getLogUnclosedConnections() |
@Nullable PrintWriter |
getLogWriter()
This implementation don't use a LogWriter.
|
@Nullable String |
getMaxResultBuffer() |
@Nullable String |
getOptions() |
Logger |
getParentLogger() |
@Nullable String |
getPassword()
Gets the password to connect with by default.
|
int |
getPortNumber()
Deprecated.
use
getPortNumbers() |
int[] |
getPortNumbers()
Gets the port(s) which the PostgreSQL server is listening on for TCP/IP connections.
|
PreferQueryMode |
getPreferQueryMode() |
int |
getPreparedStatementCacheQueries() |
int |
getPreparedStatementCacheSizeMiB() |
int |
getPrepareThreshold() |
@Nullable String |
getProperty(PGProperty property) |
@Nullable String |
getProperty(String name) |
int |
getProtocolVersion() |
boolean |
getReadOnly() |
String |
getReadOnlyMode() |
int |
getReceiveBufferSize() |
int |
getRecvBufferSize() |
Reference |
getReference() |
@Nullable String |
getReplication() |
boolean |
getReWriteBatchedInserts() |
int |
getSendBufferSize() |
String |
getServerName()
Deprecated.
use
getServerNames() |
String[] |
getServerNames()
Gets the name of the host(s) the PostgreSQL database is running on.
|
@Nullable String |
getSocketFactory() |
@Nullable String |
getSocketFactoryArg() |
int |
getSocketTimeout() |
boolean |
getSsl() |
@Nullable String |
getSslcert() |
@Nullable String |
getSslCert() |
@Nullable String |
getSslfactory() |
@Nullable String |
getSslfactoryarg() |
@Nullable String |
getSslFactoryArg() |
@Nullable String |
getSslhostnameverifier() |
@Nullable String |
getSslHostnameVerifier() |
@Nullable String |
getSslkey() |
@Nullable String |
getSslKey() |
@Nullable String |
getSslmode() |
@Nullable String |
getSslMode() |
@Nullable String |
getSslpassword() |
@Nullable String |
getSslPassword() |
@Nullable String |
getSslpasswordcallback() |
@Nullable String |
getSslPasswordCallback() |
@Nullable String |
getSslrootcert() |
@Nullable String |
getSslRootCert() |
@Nullable String |
getSspiServiceClass() |
@Nullable 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. |
@Nullable String |
getUser()
Gets the user to connect as by default.
|
boolean |
getUseSpNego() |
String |
getXmlFactoryFactory() |
void |
initializeFrom(BaseDataSource source) |
boolean |
isAllowEncodingChanges() |
boolean |
isCleanupSavePoints() |
boolean |
isColumnSanitiserDisabled() |
boolean |
isDisableColumnSanitiser() |
boolean |
isLoadBalanceHosts() |
boolean |
isLogUnclosedConnections() |
boolean |
isReadOnly() |
boolean |
isReWriteBatchedInserts() |
boolean |
isSsl() |
boolean |
isTcpKeepAlive() |
protected void |
readBaseObject(ObjectInputStream in) |
void |
setAcceptAwsProtocolOnly(boolean awsProtocolOnly) |
void |
setAdaptiveFetch(boolean adaptiveFetch) |
void |
setAdaptiveFetchMaximum(int adaptiveFetchMaximum) |
void |
setAdaptiveFetchMinimum(int adaptiveFetchMinimum) |
void |
setAllowEncodingChanges(boolean allow) |
void |
setApplicationName(@Nullable String applicationName) |
void |
setAssumeMinServerVersion(@Nullable String minVersion) |
void |
setAutosave(AutoSave autoSave) |
void |
setBinaryTransfer(boolean enabled) |
void |
setBinaryTransferDisable(@Nullable String oidList) |
void |
setBinaryTransferEnable(@Nullable String oidList) |
void |
setCancelSignalTimeout(int seconds) |
void |
setCleanupSavepoints(boolean cleanupSavepoints)
see PGProperty#CLEANUP_SAVEPOINTS
|
void |
setCleanupSavePoints(boolean cleanupSavepoints) |
void |
setClusterId(String id) |
void |
setClusterInstanceHostPattern(String hostPattern) |
void |
setClusterTopologyRefreshRateMs(int ms) |
void |
setConnectTimeout(int connectTimeout) |
void |
setCurrentSchema(@Nullable String currentSchema) |
void |
setDatabaseMetadataCacheFields(int cacheSize) |
void |
setDatabaseMetadataCacheFieldsMiB(int cacheSize) |
void |
setDatabaseName(@Nullable String databaseName)
Sets the name of the PostgreSQL database, running on the server identified by the serverName
property.
|
void |
setDefaultRowFetchSize(int fetchSize) |
void |
setDisableColumnSanitiser(boolean disableColumnSanitiser) |
void |
setEnableClusterAwareFailover(boolean enableClusterAwareFailover) |
void |
setEscapeSyntaxCallMode(@Nullable String callMode) |
void |
setFailoverClusterTopologyRefreshRateMs(int ms) |
void |
setFailoverReaderConnectTimeoutMs(int ms) |
void |
setFailoverTimeoutMs(int ms) |
void |
setFailoverWriterReconnectIntervalMs(int ms) |
void |
setFromReference(Reference ref) |
void |
setGatherPerfMetrics(boolean gatherPerfMetrics) |
void |
setGssEncMode(@Nullable String mode) |
void |
setGssLib(@Nullable String lib) |
void |
setHideUnprivilegedObjects(boolean hideUnprivileged) |
void |
setHostRecheckSeconds(int hostRecheckSeconds) |
void |
setJaasApplicationName(@Nullable String name) |
void |
setJaasLogin(boolean doLogin) |
void |
setKerberosServerName(@Nullable String serverName) |
void |
setLoadBalanceHosts(boolean loadBalanceHosts) |
void |
setLoggerFile(@Nullable String loggerFile) |
void |
setLoggerLevel(@Nullable String loggerLevel) |
void |
setLoginTimeout(int loginTimeout) |
void |
setLogServerErrorDetail(boolean enabled) |
void |
setLogUnclosedConnections(boolean enabled) |
void |
setLogWriter(@Nullable PrintWriter printWriter)
This implementation don't use a LogWriter.
|
void |
setMaxResultBuffer(@Nullable String maxResultBuffer) |
void |
setOptions(@Nullable String options)
Set command line options for this connection
|
void |
setPassword(@Nullable String password)
Sets the password to connect with by default.
|
void |
setPortNumber(int portNumber)
Deprecated.
|
void |
setPortNumbers(int[] portNumbers)
Sets the port(s) which the PostgreSQL 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(PGProperty property,
@Nullable String value) |
void |
setProperty(String name,
@Nullable String value) |
void |
setProtocolVersion(int protocolVersion) |
void |
setReadOnly(boolean readOnly) |
void |
setReadOnlyMode(@Nullable String mode) |
void |
setReceiveBufferSize(int nbytes) |
void |
setRecvBufferSize(int nbytes) |
void |
setReplication(@Nullable String replication) |
void |
setReWriteBatchedInserts(boolean reWrite) |
void |
setSendBufferSize(int nbytes) |
void |
setServerName(String serverName)
Deprecated.
|
void |
setServerNames(@Nullable String[] serverNames)
Sets the name of the host(s) the PostgreSQL database is running on.
|
void |
setSocketFactory(@Nullable String socketFactoryClassName) |
void |
setSocketFactoryArg(@Nullable String socketFactoryArg) |
void |
setSocketTimeout(int seconds) |
void |
setSsl(boolean enabled) |
void |
setSslcert(@Nullable String file) |
void |
setSslCert(@Nullable String file) |
void |
setSslfactory(String classname) |
void |
setSslfactoryarg(@Nullable String arg) |
void |
setSslFactoryArg(@Nullable String arg) |
void |
setSslhostnameverifier(@Nullable String className) |
void |
setSslHostnameVerifier(@Nullable String className) |
void |
setSslkey(@Nullable String file) |
void |
setSslKey(@Nullable String file) |
void |
setSslmode(@Nullable String mode) |
void |
setSslMode(@Nullable String mode) |
void |
setSslpassword(String sslpassword) |
void |
setSslPassword(@Nullable String password) |
void |
setSslpasswordcallback(@Nullable String className) |
void |
setSslPasswordCallback(@Nullable String className) |
void |
setSslrootcert(@Nullable String file) |
void |
setSslRootCert(@Nullable String file) |
void |
setSspiServiceClass(@Nullable String serviceClass) |
void |
setStringType(@Nullable String stringType) |
void |
setTargetServerType(@Nullable 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(@Nullable String user)
Sets the user to connect as by default.
|
void |
setUseSpNego(boolean use) |
void |
setXmlFactoryFactory(@Nullable String xmlFactoryFactory) |
protected void |
writeBaseObject(ObjectOutputStream out) |
public Connection getConnection() throws SQLException
SQLException - Occurs when the database connection cannot be established.public Connection getConnection(@Nullable String user, @Nullable String password) throws SQLException
user - userpassword - passwordSQLException - Occurs when the database connection cannot be established.public @Nullable PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(@Nullable 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 PostgreSQL database is running onpublic void setServerNames(@Nullable String[] serverNames)
localhost.serverNames - name of the host(s) the PostgreSQL database is running onpublic @Nullable String getDatabaseName()
public void setDatabaseName(@Nullable String databaseName)
databaseName - name of the PostgreSQL databasepublic abstract String getDescription()
public @Nullable String getUser()
public void setUser(@Nullable String user)
user - user to connect as by defaultpublic @Nullable String getPassword()
public void setPassword(@Nullable 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 PostgreSQL server is listening on for TCP/IPpublic void setPortNumbers(int[] portNumbers)
portNumbers - port(s) which the PostgreSQL server is listening on for TCP/IPpublic @Nullable String getOptions()
public void setOptions(@Nullable String options)
options - string to set options topublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcePGProperty.LOGIN_TIMEOUTpublic void setLoginTimeout(int loginTimeout)
setLoginTimeout in interface CommonDataSourceloginTimeout - login timeoutPGProperty.LOGIN_TIMEOUTpublic int getConnectTimeout()
PGProperty.CONNECT_TIMEOUTpublic void setConnectTimeout(int connectTimeout)
connectTimeout - connect timeoutPGProperty.CONNECT_TIMEOUTpublic int getProtocolVersion()
PGProperty.PROTOCOL_VERSIONpublic void setProtocolVersion(int protocolVersion)
protocolVersion - protocol versionPGProperty.PROTOCOL_VERSIONpublic int getReceiveBufferSize()
PGProperty.RECEIVE_BUFFER_SIZEpublic void setReceiveBufferSize(int nbytes)
nbytes - receive buffer sizePGProperty.RECEIVE_BUFFER_SIZEpublic int getSendBufferSize()
PGProperty.SEND_BUFFER_SIZEpublic void setSendBufferSize(int nbytes)
nbytes - send buffer sizePGProperty.SEND_BUFFER_SIZEpublic void setPrepareThreshold(int count)
count - prepare thresholdPGProperty.PREPARE_THRESHOLDpublic int getPrepareThreshold()
PGProperty.PREPARE_THRESHOLDpublic int getPreparedStatementCacheQueries()
PGProperty.PREPARED_STATEMENT_CACHE_QUERIESpublic void setPreparedStatementCacheQueries(int cacheSize)
cacheSize - prepared statement cache size (number of statements per connection)PGProperty.PREPARED_STATEMENT_CACHE_QUERIESpublic int getPreparedStatementCacheSizeMiB()
PGProperty.PREPARED_STATEMENT_CACHE_SIZE_MIBpublic void setPreparedStatementCacheSizeMiB(int cacheSize)
cacheSize - statement cache size (number of megabytes per connection)PGProperty.PREPARED_STATEMENT_CACHE_SIZE_MIBpublic int getDatabaseMetadataCacheFields()
PGProperty.DATABASE_METADATA_CACHE_FIELDSpublic void setDatabaseMetadataCacheFields(int cacheSize)
cacheSize - database metadata cache fields size (number of fields cached per connection)PGProperty.DATABASE_METADATA_CACHE_FIELDSpublic int getDatabaseMetadataCacheFieldsMiB()
PGProperty.DATABASE_METADATA_CACHE_FIELDS_MIBpublic void setDatabaseMetadataCacheFieldsMiB(int cacheSize)
cacheSize - database metadata cache fields size (number of megabytes per connection)PGProperty.DATABASE_METADATA_CACHE_FIELDS_MIBpublic void setDefaultRowFetchSize(int fetchSize)
fetchSize - default fetch sizePGProperty.DEFAULT_ROW_FETCH_SIZEpublic int getDefaultRowFetchSize()
PGProperty.DEFAULT_ROW_FETCH_SIZEpublic void setUnknownLength(int unknownLength)
unknownLength - unknown lengthPGProperty.UNKNOWN_LENGTHpublic int getUnknownLength()
PGProperty.UNKNOWN_LENGTHpublic void setSocketTimeout(int seconds)
seconds - socket timeoutPGProperty.SOCKET_TIMEOUTpublic int getSocketTimeout()
PGProperty.SOCKET_TIMEOUTpublic void setCancelSignalTimeout(int seconds)
seconds - timeout that is used for sending cancel commandPGProperty.CANCEL_SIGNAL_TIMEOUTpublic int getCancelSignalTimeout()
PGProperty.CANCEL_SIGNAL_TIMEOUTpublic void setSsl(boolean enabled)
enabled - if SSL is enabledPGProperty.SSLpublic boolean getSsl()
PGProperty.SSLpublic void setSslfactory(String classname)
classname - SSL factory class namePGProperty.SSL_FACTORYpublic @Nullable String getSslfactory()
PGProperty.SSL_FACTORYpublic @Nullable String getSslMode()
PGProperty.SSL_MODEpublic void setSslMode(@Nullable String mode)
mode - SSL modePGProperty.SSL_MODEpublic @Nullable String getSslFactoryArg()
PGProperty.SSL_FACTORY_ARGpublic void setSslFactoryArg(@Nullable String arg)
arg - argument forwarded to SSL factoryPGProperty.SSL_FACTORY_ARGpublic @Nullable String getSslHostnameVerifier()
PGProperty.SSL_HOSTNAME_VERIFIERpublic void setSslHostnameVerifier(@Nullable String className)
className - SSL hostname verifierPGProperty.SSL_HOSTNAME_VERIFIERpublic @Nullable String getSslCert()
PGProperty.SSL_CERTpublic void setSslCert(@Nullable String file)
file - SSL certificatePGProperty.SSL_CERTpublic @Nullable String getSslKey()
PGProperty.SSL_KEYpublic void setSslKey(@Nullable String file)
file - SSL keyPGProperty.SSL_KEYpublic @Nullable String getSslRootCert()
PGProperty.SSL_ROOT_CERTpublic void setSslRootCert(@Nullable String file)
file - SSL root certificatePGProperty.SSL_ROOT_CERTpublic @Nullable String getSslPassword()
PGProperty.SSL_PASSWORDpublic void setSslPassword(@Nullable String password)
password - SSL passwordPGProperty.SSL_PASSWORDpublic @Nullable String getSslPasswordCallback()
PGProperty.SSL_PASSWORD_CALLBACKpublic void setSslPasswordCallback(@Nullable String className)
className - SSL password callback class namePGProperty.SSL_PASSWORD_CALLBACKpublic void setApplicationName(@Nullable String applicationName)
applicationName - application namePGProperty.APPLICATION_NAMEpublic String getApplicationName()
PGProperty.APPLICATION_NAMEpublic void setTargetServerType(@Nullable String targetServerType)
targetServerType - target server typePGProperty.TARGET_SERVER_TYPEpublic String getTargetServerType()
PGProperty.TARGET_SERVER_TYPEpublic void setLoadBalanceHosts(boolean loadBalanceHosts)
loadBalanceHosts - load balance hostsPGProperty.LOAD_BALANCE_HOSTSpublic boolean getLoadBalanceHosts()
PGProperty.LOAD_BALANCE_HOSTSpublic void setHostRecheckSeconds(int hostRecheckSeconds)
hostRecheckSeconds - host recheck secondsPGProperty.HOST_RECHECK_SECONDSpublic int getHostRecheckSeconds()
PGProperty.HOST_RECHECK_SECONDSpublic void setTcpKeepAlive(boolean enabled)
enabled - if TCP keep alive should be enabledPGProperty.TCP_KEEP_ALIVEpublic boolean getTcpKeepAlive()
PGProperty.TCP_KEEP_ALIVEpublic void setBinaryTransfer(boolean enabled)
enabled - if binary transfer should be enabledPGProperty.BINARY_TRANSFERpublic boolean getBinaryTransfer()
PGProperty.BINARY_TRANSFERpublic void setBinaryTransferEnable(@Nullable String oidList)
oidList - list of OIDs that are allowed to use binary transferPGProperty.BINARY_TRANSFER_ENABLEpublic String getBinaryTransferEnable()
PGProperty.BINARY_TRANSFER_ENABLEpublic void setBinaryTransferDisable(@Nullable String oidList)
oidList - list of OIDs that are not allowed to use binary transferPGProperty.BINARY_TRANSFER_DISABLEpublic String getBinaryTransferDisable()
PGProperty.BINARY_TRANSFER_DISABLEpublic @Nullable String getStringType()
PGProperty.STRING_TYPEpublic void setStringType(@Nullable String stringType)
stringType - string typePGProperty.STRING_TYPEpublic boolean isColumnSanitiserDisabled()
PGProperty.DISABLE_COLUMN_SANITISERpublic boolean getDisableColumnSanitiser()
PGProperty.DISABLE_COLUMN_SANITISERpublic void setDisableColumnSanitiser(boolean disableColumnSanitiser)
disableColumnSanitiser - if column sanitizer should be disabledPGProperty.DISABLE_COLUMN_SANITISERpublic @Nullable String getCurrentSchema()
PGProperty.CURRENT_SCHEMApublic void setCurrentSchema(@Nullable String currentSchema)
currentSchema - current schemaPGProperty.CURRENT_SCHEMApublic boolean getReadOnly()
PGProperty.READ_ONLYpublic void setReadOnly(boolean readOnly)
readOnly - if connection should be readonlyPGProperty.READ_ONLYpublic String getReadOnlyMode()
PGProperty.READ_ONLY_MODEpublic void setReadOnlyMode(@Nullable String mode)
mode - the behavior when set read onlyPGProperty.READ_ONLY_MODEpublic boolean getLogUnclosedConnections()
PGProperty.LOG_UNCLOSED_CONNECTIONSpublic void setLogUnclosedConnections(boolean enabled)
enabled - true if driver should log unclosed connectionsPGProperty.LOG_UNCLOSED_CONNECTIONSpublic boolean getLogServerErrorDetail()
PGProperty.LOG_SERVER_ERROR_DETAILpublic void setLogServerErrorDetail(boolean enabled)
enabled - true if driver should include detail in server error messagesPGProperty.LOG_SERVER_ERROR_DETAILpublic @Nullable String getAssumeMinServerVersion()
PGProperty.ASSUME_MIN_SERVER_VERSIONpublic void setAssumeMinServerVersion(@Nullable String minVersion)
minVersion - assumed minimal server versionPGProperty.ASSUME_MIN_SERVER_VERSIONpublic @Nullable String getJaasApplicationName()
PGProperty.JAAS_APPLICATION_NAMEpublic void setJaasApplicationName(@Nullable String name)
name - JAAS application namePGProperty.JAAS_APPLICATION_NAMEpublic boolean getJaasLogin()
PGProperty.JAAS_LOGINpublic void setJaasLogin(boolean doLogin)
doLogin - true if perform JAAS login before GSS authenticationPGProperty.JAAS_LOGINpublic @Nullable String getKerberosServerName()
PGProperty.KERBEROS_SERVER_NAMEpublic void setKerberosServerName(@Nullable String serverName)
serverName - Kerberos server namePGProperty.KERBEROS_SERVER_NAMEpublic boolean getUseSpNego()
PGProperty.USE_SPNEGOpublic void setUseSpNego(boolean use)
use - true if use SPNEGOPGProperty.USE_SPNEGOpublic @Nullable String getGssLib()
PGProperty.GSS_LIBpublic void setGssLib(@Nullable String lib)
lib - GSS mode: auto, sspi, or gssapiPGProperty.GSS_LIBpublic String getGssEncMode()
public void setGssEncMode(@Nullable String mode)
mode - encryption mode: disable, prefer or requirepublic @Nullable String getSspiServiceClass()
PGProperty.SSPI_SERVICE_CLASSpublic void setSspiServiceClass(@Nullable String serviceClass)
serviceClass - SSPI service classPGProperty.SSPI_SERVICE_CLASSpublic boolean getAllowEncodingChanges()
PGProperty.ALLOW_ENCODING_CHANGESpublic void setAllowEncodingChanges(boolean allow)
allow - if connection allows encoding changesPGProperty.ALLOW_ENCODING_CHANGESpublic @Nullable String getSocketFactory()
PGProperty.SOCKET_FACTORYpublic void setSocketFactory(@Nullable String socketFactoryClassName)
socketFactoryClassName - socket factory class namePGProperty.SOCKET_FACTORYpublic @Nullable String getSocketFactoryArg()
PGProperty.SOCKET_FACTORY_ARGpublic void setSocketFactoryArg(@Nullable String socketFactoryArg)
socketFactoryArg - socket factory argumentPGProperty.SOCKET_FACTORY_ARGpublic void setReplication(@Nullable String replication)
replication - set to 'database' for logical replication or 'true' for physical replicationPGProperty.REPLICATIONpublic String getEscapeSyntaxCallMode()
PGProperty.ESCAPE_SYNTAX_CALL_MODEpublic void setEscapeSyntaxCallMode(@Nullable String callMode)
callMode - the call mode to use for JDBC escape call syntaxPGProperty.ESCAPE_SYNTAX_CALL_MODEpublic @Nullable String getReplication()
PGProperty.REPLICATIONpublic @Nullable String getLoggerLevel()
PGProperty.LOGGER_LEVELpublic void setLoggerLevel(@Nullable String loggerLevel)
loggerLevel - of the JDBC DriverPGProperty.LOGGER_LEVELpublic @Nullable String getLoggerFile()
PGProperty.LOGGER_FILEpublic void setLoggerFile(@Nullable String loggerFile)
loggerFile - File output of the Logger.PGProperty.LOGGER_LEVELpublic 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)
DriverManager URL.url - properties to setpublic void setURL(String url)
DriverManager URL.
Added to follow convention used in other DBMS.url - properties to setpublic @Nullable String getProperty(String name) throws SQLException
SQLExceptionpublic void setProperty(String name, @Nullable String value) throws SQLException
SQLExceptionpublic @Nullable String getProperty(PGProperty property)
public void setProperty(PGProperty property, @Nullable 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()
PGProperty.PREFER_QUERY_MODEpublic void setPreferQueryMode(PreferQueryMode preferQueryMode)
preferQueryMode - extended, simple, extendedForPrepared, or extendedCacheEverythingPGProperty.PREFER_QUERY_MODEpublic AutoSave getAutosave()
PGProperty.AUTOSAVEpublic void setAutosave(AutoSave autoSave)
autoSave - connection configuration regarding automatic per-query savepointsPGProperty.AUTOSAVEpublic boolean getCleanupSavepoints()
public void setCleanupSavepoints(boolean cleanupSavepoints)
cleanupSavepoints - will cleanup savepoints after a successful transactionpublic boolean getReWriteBatchedInserts()
PGProperty.REWRITE_BATCHED_INSERTSpublic void setReWriteBatchedInserts(boolean reWrite)
reWrite - boolean value to set the property in the properties collectionPGProperty.REWRITE_BATCHED_INSERTSpublic boolean getHideUnprivilegedObjects()
PGProperty.HIDE_UNPRIVILEGED_OBJECTSpublic void setHideUnprivilegedObjects(boolean hideUnprivileged)
hideUnprivileged - boolean value to set the property in the properties collectionPGProperty.HIDE_UNPRIVILEGED_OBJECTSpublic @Nullable String getMaxResultBuffer()
public void setMaxResultBuffer(@Nullable String maxResultBuffer)
public boolean getAdaptiveFetch()
public void setAdaptiveFetch(boolean adaptiveFetch)
public int getAdaptiveFetchMaximum()
public void setAdaptiveFetchMaximum(int adaptiveFetchMaximum)
public int getAdaptiveFetchMinimum()
public void setAdaptiveFetchMinimum(int adaptiveFetchMinimum)
public Logger getParentLogger()
getParentLogger in interface CommonDataSourcepublic String getXmlFactoryFactory()
public void setXmlFactoryFactory(@Nullable String xmlFactoryFactory)
public boolean isSsl()
public @Nullable String getSslfactoryarg()
public void setSslfactoryarg(@Nullable String arg)
public @Nullable String getSslcert()
public void setSslcert(@Nullable String file)
public @Nullable String getSslmode()
public void setSslmode(@Nullable String mode)
public @Nullable String getSslhostnameverifier()
public void setSslhostnameverifier(@Nullable String className)
public @Nullable String getSslkey()
public void setSslkey(@Nullable String file)
public @Nullable String getSslrootcert()
public void setSslrootcert(@Nullable String file)
public @Nullable String getSslpasswordcallback()
public void setSslpasswordcallback(@Nullable String className)
public @Nullable 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()
public boolean getAcceptAwsProtocolOnly()
public void setAcceptAwsProtocolOnly(boolean awsProtocolOnly)
public @Nullable String getClusterId()
public void setClusterId(String id)
public @Nullable String getClusterInstanceHostPattern()
public void setClusterInstanceHostPattern(String hostPattern)
public int getClusterTopologyRefreshRateMs()
throws PSQLException
PSQLExceptionpublic void setClusterTopologyRefreshRateMs(int ms)
public boolean getEnableClusterAwareFailover()
public void setEnableClusterAwareFailover(boolean enableClusterAwareFailover)
public int getFailoverClusterTopologyRefreshRateMs()
throws PSQLException
PSQLExceptionpublic void setFailoverClusterTopologyRefreshRateMs(int ms)
public int getFailoverReaderConnectTimeoutMs()
throws PSQLException
PSQLExceptionpublic void setFailoverReaderConnectTimeoutMs(int ms)
public int getFailoverTimeoutMs()
throws PSQLException
PSQLExceptionpublic void setFailoverTimeoutMs(int ms)
public int getFailoverWriterReconnectIntervalMs()
throws PSQLException
PSQLExceptionpublic void setFailoverWriterReconnectIntervalMs(int ms)
public boolean getGatherPerfMetrics()
public void setGatherPerfMetrics(boolean gatherPerfMetrics)
Copyright © 1997-2021 PostgreSQL Global Development Group. All Rights Reserved.