public abstract class BaseDataSource
extends java.lang.Object
implements javax.sql.CommonDataSource, javax.naming.Referenceable
| Constructor and Description |
|---|
BaseDataSource() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.naming.Reference |
createReference()
Generates a reference using the appropriate object factory.
|
boolean |
getAdaptiveFetch() |
int |
getAdaptiveFetchMaximum() |
int |
getAdaptiveFetchMinimum() |
boolean |
getAllowEncodingChanges() |
java.lang.String |
getApplicationName() |
java.lang.String |
getAssumeMinServerVersion() |
java.lang.String |
getAuthenticationPluginClassName() |
AutoSave |
getAutosave() |
boolean |
getBinaryTransfer() |
java.lang.String |
getBinaryTransferDisable() |
java.lang.String |
getBinaryTransferEnable() |
int |
getCancelSignalTimeout() |
java.lang.String |
getChannelBinding() |
boolean |
getCleanupSavepoints()
see PGProperty#CLEANUP_SAVEPOINTS
|
java.sql.Connection |
getConnection()
Gets a connection to the PostgreSQL database.
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Gets a connection to the PostgreSQL database.
|
int |
getConnectTimeout() |
java.lang.String |
getCurrentSchema() |
int |
getDatabaseMetadataCacheFields() |
int |
getDatabaseMetadataCacheFieldsMiB() |
java.lang.String |
getDatabaseName()
Gets the name of the PostgreSQL database, running on the server identified by the serverName
property.
|
int |
getDefaultRowFetchSize() |
abstract java.lang.String |
getDescription()
Gets a description of this DataSource-ish thing.
|
boolean |
getDisableColumnSanitiser() |
java.lang.String |
getEscapeSyntaxCallMode() |
boolean |
getGroupStartupParameters()
Deprecated.
since we can send the startup parameters as a multistatment transaction
|
java.lang.String |
getGssEncMode() |
java.lang.String |
getGssLib() |
int |
getGssResponseTimeout() |
boolean |
getGssUseDefaultCreds() |
boolean |
getHideUnprivilegedObjects() |
int |
getHostRecheckSeconds() |
java.lang.String |
getJaasApplicationName() |
boolean |
getJaasLogin() |
java.lang.String |
getKerberosServerName() |
boolean |
getLoadBalanceHosts() |
java.lang.String |
getLocalSocketAddress() |
java.lang.String |
getLoggerFile()
Deprecated.
Configure via java.util.logging
|
java.lang.String |
getLoggerLevel()
Deprecated.
Configure via java.util.logging
|
int |
getLoginTimeout() |
boolean |
getLogServerErrorDetail() |
boolean |
getLogUnclosedConnections() |
java.io.PrintWriter |
getLogWriter()
This implementation don't use a LogWriter.
|
java.lang.String |
getMaxResultBuffer() |
int |
getMaxSendBufferSize() |
java.lang.String |
getOptions() |
java.util.logging.Logger |
getParentLogger() |
java.lang.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() |
java.lang.String |
getProperty(PGProperty property) |
java.lang.String |
getProperty(java.lang.String name) |
int |
getProtocolVersion() |
boolean |
getQuoteReturningIdentifiers() |
boolean |
getReadOnly() |
java.lang.String |
getReadOnlyMode() |
int |
getReceiveBufferSize() |
int |
getRecvBufferSize() |
javax.naming.Reference |
getReference() |
java.lang.String |
getReplication() |
boolean |
getReWriteBatchedInserts() |
int |
getSendBufferSize() |
java.lang.String |
getServerName()
Deprecated.
use
getServerNames() |
java.lang.String[] |
getServerNames()
Gets the name of the host(s) the PostgreSQL database is running on.
|
java.lang.String |
getSocketFactory() |
java.lang.String |
getSocketFactoryArg() |
int |
getSocketTimeout() |
boolean |
getSsl() |
java.lang.String |
getSslcert() |
java.lang.String |
getSslCert() |
java.lang.String |
getSslfactory() |
java.lang.String |
getSslfactoryarg() |
java.lang.String |
getSslFactoryArg() |
java.lang.String |
getSslhostnameverifier() |
java.lang.String |
getSslHostnameVerifier() |
java.lang.String |
getSslkey() |
java.lang.String |
getSslKey() |
java.lang.String |
getSslmode() |
java.lang.String |
getSslMode() |
java.lang.String |
getSslNegotiation() |
java.lang.String |
getSslpassword() |
java.lang.String |
getSslPassword() |
java.lang.String |
getSslpasswordcallback() |
java.lang.String |
getSslPasswordCallback() |
int |
getSslResponseTimeout() |
java.lang.String |
getSslrootcert() |
java.lang.String |
getSslRootCert() |
java.lang.String |
getSspiServiceClass() |
java.lang.String |
getStringType() |
java.lang.String |
getTargetServerType() |
boolean |
getTcpKeepAlive() |
boolean |
getTcpNoDelay() |
int |
getUnknownLength() |
java.lang.String |
getUrl()
Generates a
DriverManager URL from the other properties supplied. |
java.lang.String |
getURL()
Generates a
DriverManager URL from the other properties supplied. |
java.lang.String |
getUser()
Gets the user to connect as by default.
|
boolean |
getUseSpNego() |
java.lang.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(java.io.ObjectInputStream in) |
void |
setAdaptiveFetch(boolean adaptiveFetch) |
void |
setAdaptiveFetchMaximum(int adaptiveFetchMaximum) |
void |
setAdaptiveFetchMinimum(int adaptiveFetchMinimum) |
void |
setAllowEncodingChanges(boolean allow) |
void |
setApplicationName(java.lang.String applicationName) |
void |
setAssumeMinServerVersion(java.lang.String minVersion) |
void |
setAuthenticationPluginClassName(java.lang.String className) |
void |
setAutosave(AutoSave autoSave) |
void |
setBinaryTransfer(boolean enabled) |
void |
setBinaryTransferDisable(java.lang.String oidList) |
void |
setBinaryTransferEnable(java.lang.String oidList) |
void |
setCancelSignalTimeout(int seconds) |
void |
setChannelBinding(java.lang.String channelBinding) |
void |
setCleanupSavepoints(boolean cleanupSavepoints)
see PGProperty#CLEANUP_SAVEPOINTS
|
void |
setCleanupSavePoints(boolean cleanupSavepoints) |
void |
setConnectTimeout(int connectTimeout) |
void |
setCurrentSchema(java.lang.String currentSchema) |
void |
setDatabaseMetadataCacheFields(int cacheSize) |
void |
setDatabaseMetadataCacheFieldsMiB(int cacheSize) |
void |
setDatabaseName(java.lang.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 |
setEscapeSyntaxCallMode(java.lang.String callMode) |
void |
setFromReference(javax.naming.Reference ref) |
void |
setGroupStartupParameters(boolean groupStartupParameters)
Deprecated.
since we can send the startup parameters as a multistatment transaction
|
void |
setGssEncMode(java.lang.String mode) |
void |
setGssLib(java.lang.String lib) |
void |
setGssResponseTimeout(int gssResponseTimeout) |
void |
setGssUseDefaultCreds(boolean gssUseDefaultCreds) |
void |
setHideUnprivilegedObjects(boolean hideUnprivileged) |
void |
setHostRecheckSeconds(int hostRecheckSeconds) |
void |
setJaasApplicationName(java.lang.String name) |
void |
setJaasLogin(boolean doLogin) |
void |
setKerberosServerName(java.lang.String serverName) |
void |
setLoadBalanceHosts(boolean loadBalanceHosts) |
void |
setLocalSocketAddress(java.lang.String localSocketAddress) |
void |
setLoggerFile(java.lang.String loggerFile)
Deprecated.
Configure via java.util.logging
|
void |
setLoggerLevel(java.lang.String loggerLevel)
Deprecated.
Configure via java.util.logging
|
void |
setLoginTimeout(int loginTimeout) |
void |
setLogServerErrorDetail(boolean enabled) |
void |
setLogUnclosedConnections(boolean enabled) |
void |
setLogWriter(java.io.PrintWriter printWriter)
This implementation don't use a LogWriter.
|
void |
setMaxResultBuffer(java.lang.String maxResultBuffer) |
void |
setMaxSendBufferSize(int nbytes) |
void |
setOptions(java.lang.String options)
Set command line options for this connection
|
void |
setPassword(java.lang.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,
java.lang.String value) |
void |
setProperty(java.lang.String name,
java.lang.String value) |
void |
setProtocolVersion(int protocolVersion) |
void |
setQuoteReturningIdentifiers(boolean quoteIdentifiers) |
void |
setReadOnly(boolean readOnly) |
void |
setReadOnlyMode(java.lang.String mode) |
void |
setReceiveBufferSize(int nbytes) |
void |
setRecvBufferSize(int nbytes) |
void |
setReplication(java.lang.String replication) |
void |
setReWriteBatchedInserts(boolean reWrite) |
void |
setSendBufferSize(int nbytes) |
void |
setServerName(java.lang.String serverName)
Deprecated.
|
void |
setServerNames(java.lang.String[] serverNames)
Sets the name of the host(s) the PostgreSQL database is running on.
|
void |
setSocketFactory(java.lang.String socketFactoryClassName) |
void |
setSocketFactoryArg(java.lang.String socketFactoryArg) |
void |
setSocketTimeout(int seconds) |
void |
setSsl(boolean enabled) |
void |
setSslcert(java.lang.String file) |
void |
setSslCert(java.lang.String file) |
void |
setSslfactory(java.lang.String classname) |
void |
setSslfactoryarg(java.lang.String arg) |
void |
setSslFactoryArg(java.lang.String arg) |
void |
setSslhostnameverifier(java.lang.String className) |
void |
setSslHostnameVerifier(java.lang.String className) |
void |
setSslkey(java.lang.String file) |
void |
setSslKey(java.lang.String file) |
void |
setSslmode(java.lang.String mode) |
void |
setSslMode(java.lang.String mode) |
void |
setSslNegotiation(java.lang.String sslNegotiation) |
void |
setSslpassword(java.lang.String sslpassword) |
void |
setSslPassword(java.lang.String password) |
void |
setSslpasswordcallback(java.lang.String className) |
void |
setSslPasswordCallback(java.lang.String className) |
void |
setSslResponseTimeout(int sslResponseTimeout) |
void |
setSslrootcert(java.lang.String file) |
void |
setSslRootCert(java.lang.String file) |
void |
setSspiServiceClass(java.lang.String serviceClass) |
void |
setStringType(java.lang.String stringType) |
void |
setTargetServerType(java.lang.String targetServerType) |
void |
setTcpKeepAlive(boolean enabled) |
void |
setTcpNoDelay(boolean enabled) |
void |
setUnknownLength(int unknownLength) |
void |
setUrl(java.lang.String url)
Sets properties from a
DriverManager URL. |
void |
setURL(java.lang.String url)
Sets properties from a
DriverManager URL. |
void |
setUser(java.lang.String user)
Sets the user to connect as by default.
|
void |
setUseSpNego(boolean use) |
void |
setXmlFactoryFactory(java.lang.String xmlFactoryFactory) |
protected void |
writeBaseObject(java.io.ObjectOutputStream out) |
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - Occurs when the database connection cannot be established.public java.sql.Connection getConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
user - userpassword - passwordjava.sql.SQLException - Occurs when the database connection cannot be established.public java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.CommonDataSourcepublic void setLogWriter(java.io.PrintWriter printWriter)
setLogWriter in interface javax.sql.CommonDataSourceprintWriter - Not used@Deprecated public java.lang.String getServerName()
getServerNames()public java.lang.String[] getServerNames()
@Deprecated public void setServerName(java.lang.String serverName)
setServerNames(String[])localhost.serverName - name of the host the PostgreSQL database is running onpublic void setServerNames(java.lang.String[] serverNames)
localhost.serverNames - name of the host(s) the PostgreSQL database is running onpublic java.lang.String getDatabaseName()
public void setDatabaseName(java.lang.String databaseName)
databaseName - name of the PostgreSQL databasepublic abstract java.lang.String getDescription()
public java.lang.String getUser()
public void setUser(java.lang.String user)
user - user to connect as by defaultpublic java.lang.String getPassword()
public void setPassword(java.lang.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 java.lang.String getOptions()
public void setOptions(java.lang.String options)
options - string to set options topublic int getLoginTimeout()
getLoginTimeout in interface javax.sql.CommonDataSourcePGProperty.LOGIN_TIMEOUTpublic void setLoginTimeout(int loginTimeout)
setLoginTimeout in interface javax.sql.CommonDataSourceloginTimeout - login timeoutPGProperty.LOGIN_TIMEOUTpublic int getConnectTimeout()
PGProperty.CONNECT_TIMEOUTpublic void setConnectTimeout(int connectTimeout)
connectTimeout - connect timeoutPGProperty.CONNECT_TIMEOUTpublic int getGssResponseTimeout()
PGProperty.GSS_RESPONSE_TIMEOUTpublic void setGssResponseTimeout(int gssResponseTimeout)
gssResponseTimeout - gss response timeoutPGProperty.GSS_RESPONSE_TIMEOUTpublic int getSslResponseTimeout()
PGProperty.SSL_RESPONSE_TIMEOUTpublic void setSslResponseTimeout(int sslResponseTimeout)
sslResponseTimeout - ssl response timeoutPGProperty.SSL_RESPONSE_TIMEOUTpublic int getProtocolVersion()
PGProperty.PROTOCOL_VERSIONpublic void setProtocolVersion(int protocolVersion)
protocolVersion - protocol versionPGProperty.PROTOCOL_VERSIONpublic boolean getQuoteReturningIdentifiers()
PGProperty.QUOTE_RETURNING_IDENTIFIERSpublic void setQuoteReturningIdentifiers(boolean quoteIdentifiers)
quoteIdentifiers - indicate whether to quote identifiersPGProperty.QUOTE_RETURNING_IDENTIFIERSpublic 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 int getMaxSendBufferSize()
PGProperty.MAX_SEND_BUFFER_SIZEpublic void setMaxSendBufferSize(int nbytes)
nbytes - send max buffer sizePGProperty.MAX_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(java.lang.String classname)
classname - SSL factory class namePGProperty.SSL_FACTORYpublic java.lang.String getSslfactory()
PGProperty.SSL_FACTORYpublic java.lang.String getSslMode()
PGProperty.SSL_MODEpublic void setSslMode(java.lang.String mode)
mode - SSL modePGProperty.SSL_MODEpublic java.lang.String getSslFactoryArg()
PGProperty.SSL_FACTORY_ARGpublic void setSslFactoryArg(java.lang.String arg)
arg - argument forwarded to SSL factoryPGProperty.SSL_FACTORY_ARGpublic java.lang.String getSslHostnameVerifier()
PGProperty.SSL_HOSTNAME_VERIFIERpublic void setSslHostnameVerifier(java.lang.String className)
className - SSL hostname verifierPGProperty.SSL_HOSTNAME_VERIFIERpublic java.lang.String getSslCert()
PGProperty.SSL_CERTpublic void setSslCert(java.lang.String file)
file - SSL certificatePGProperty.SSL_CERTpublic java.lang.String getSslKey()
PGProperty.SSL_KEYpublic void setSslKey(java.lang.String file)
file - SSL keyPGProperty.SSL_KEYpublic java.lang.String getSslRootCert()
PGProperty.SSL_ROOT_CERTpublic void setSslRootCert(java.lang.String file)
file - SSL root certificatePGProperty.SSL_ROOT_CERTpublic void setSslNegotiation(java.lang.String sslNegotiation)
sslNegotiation - one of SSLNegotiation.POSTGRES or SSLNegotiation.DIRECTPGProperty.SSL_NEGOTIATIONpublic java.lang.String getSslNegotiation()
PGProperty.SSL_NEGOTIATIONpublic java.lang.String getSslPassword()
PGProperty.SSL_PASSWORDpublic void setSslPassword(java.lang.String password)
password - SSL passwordPGProperty.SSL_PASSWORDpublic java.lang.String getSslPasswordCallback()
PGProperty.SSL_PASSWORD_CALLBACKpublic void setSslPasswordCallback(java.lang.String className)
className - SSL password callback class namePGProperty.SSL_PASSWORD_CALLBACKpublic void setApplicationName(java.lang.String applicationName)
applicationName - application namePGProperty.APPLICATION_NAMEpublic java.lang.String getApplicationName()
PGProperty.APPLICATION_NAMEpublic void setTargetServerType(java.lang.String targetServerType)
targetServerType - target server typePGProperty.TARGET_SERVER_TYPEpublic java.lang.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 setTcpNoDelay(boolean enabled)
enabled - if TCP no delay should be enabledPGProperty.TCP_NO_DELAYpublic boolean getTcpNoDelay()
PGProperty.TCP_NO_DELAYpublic void setBinaryTransfer(boolean enabled)
enabled - if binary transfer should be enabledPGProperty.BINARY_TRANSFERpublic boolean getBinaryTransfer()
PGProperty.BINARY_TRANSFERpublic void setBinaryTransferEnable(java.lang.String oidList)
oidList - list of OIDs that are allowed to use binary transferPGProperty.BINARY_TRANSFER_ENABLEpublic java.lang.String getBinaryTransferEnable()
PGProperty.BINARY_TRANSFER_ENABLEpublic void setBinaryTransferDisable(java.lang.String oidList)
oidList - list of OIDs that are not allowed to use binary transferPGProperty.BINARY_TRANSFER_DISABLEpublic java.lang.String getBinaryTransferDisable()
PGProperty.BINARY_TRANSFER_DISABLEpublic java.lang.String getStringType()
PGProperty.STRING_TYPEpublic void setStringType(java.lang.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 java.lang.String getCurrentSchema()
PGProperty.CURRENT_SCHEMApublic void setCurrentSchema(java.lang.String currentSchema)
currentSchema - current schemaPGProperty.CURRENT_SCHEMApublic boolean getReadOnly()
PGProperty.READ_ONLYpublic void setReadOnly(boolean readOnly)
readOnly - if connection should be readonlyPGProperty.READ_ONLYpublic java.lang.String getReadOnlyMode()
PGProperty.READ_ONLY_MODEpublic void setReadOnlyMode(java.lang.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 java.lang.String getAssumeMinServerVersion()
PGProperty.ASSUME_MIN_SERVER_VERSIONpublic void setAssumeMinServerVersion(java.lang.String minVersion)
minVersion - assumed minimal server versionPGProperty.ASSUME_MIN_SERVER_VERSION@Deprecated public boolean getGroupStartupParameters()
PGProperty.GROUP_STARTUP_PARAMETERS@Deprecated public void setGroupStartupParameters(boolean groupStartupParameters)
groupStartupParameters - whether to group startup Parameters in a transaction or notPGProperty.GROUP_STARTUP_PARAMETERSpublic java.lang.String getJaasApplicationName()
PGProperty.JAAS_APPLICATION_NAMEpublic void setJaasApplicationName(java.lang.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 boolean getGssUseDefaultCreds()
PGProperty.GSS_USE_DEFAULT_CREDSpublic void setGssUseDefaultCreds(boolean gssUseDefaultCreds)
gssUseDefaultCreds - true if using default GSS credentialsPGProperty.GSS_USE_DEFAULT_CREDSpublic java.lang.String getKerberosServerName()
PGProperty.KERBEROS_SERVER_NAMEpublic void setKerberosServerName(java.lang.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 java.lang.String getGssLib()
PGProperty.GSS_LIBpublic void setGssLib(java.lang.String lib)
lib - GSS mode: auto, sspi, or gssapiPGProperty.GSS_LIBpublic java.lang.String getGssEncMode()
public void setGssEncMode(java.lang.String mode)
mode - encryption mode: disable, prefer or requirepublic java.lang.String getSspiServiceClass()
PGProperty.SSPI_SERVICE_CLASSpublic void setSspiServiceClass(java.lang.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 java.lang.String getSocketFactory()
PGProperty.SOCKET_FACTORYpublic void setSocketFactory(java.lang.String socketFactoryClassName)
socketFactoryClassName - socket factory class namePGProperty.SOCKET_FACTORYpublic java.lang.String getSocketFactoryArg()
PGProperty.SOCKET_FACTORY_ARGpublic void setSocketFactoryArg(java.lang.String socketFactoryArg)
socketFactoryArg - socket factory argumentPGProperty.SOCKET_FACTORY_ARGpublic void setReplication(java.lang.String replication)
replication - set to 'database' for logical replication or 'true' for physical replicationPGProperty.REPLICATIONpublic java.lang.String getEscapeSyntaxCallMode()
PGProperty.ESCAPE_SYNTAX_CALL_MODEpublic void setEscapeSyntaxCallMode(java.lang.String callMode)
callMode - the call mode to use for JDBC escape call syntaxPGProperty.ESCAPE_SYNTAX_CALL_MODEpublic java.lang.String getReplication()
PGProperty.REPLICATIONpublic java.lang.String getLocalSocketAddress()
PGProperty.LOCAL_SOCKET_ADDRESSpublic void setLocalSocketAddress(java.lang.String localSocketAddress)
localSocketAddress - local address to bind client side toPGProperty.LOCAL_SOCKET_ADDRESS@Deprecated public java.lang.String getLoggerLevel()
@Deprecated public void setLoggerLevel(java.lang.String loggerLevel)
loggerLevel - loggerLevel to set, will be ignored@Deprecated public java.lang.String getLoggerFile()
@Deprecated public void setLoggerFile(java.lang.String loggerFile)
loggerFile - will be ignoredpublic java.lang.String getChannelBinding()
PGProperty.CHANNEL_BINDINGpublic void setChannelBinding(java.lang.String channelBinding)
channelBinding - Channel binding optionPGProperty.CHANNEL_BINDINGpublic java.lang.String getUrl()
DriverManager URL from the other properties supplied.DriverManager URL from the other properties suppliedpublic java.lang.String getURL()
DriverManager URL from the other properties supplied.DriverManager URL from the other properties suppliedpublic void setUrl(java.lang.String url)
DriverManager URL.url - properties to setpublic void setURL(java.lang.String url)
DriverManager URL.
Added to follow convention used in other DBMS.url - properties to setpublic java.lang.String getAuthenticationPluginClassName()
public void setAuthenticationPluginClassName(java.lang.String className)
className - name of a class which implements AuthenticationPlugin
This class will be used to get the encoded bytes to be sent to the server as the
password to authenticate the user.public java.lang.String getProperty(java.lang.String name)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setProperty(java.lang.String name,
java.lang.String value)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getProperty(PGProperty property)
public void setProperty(PGProperty property, java.lang.String value)
protected javax.naming.Reference createReference()
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingExceptionpublic void setFromReference(javax.naming.Reference ref)
protected void writeBaseObject(java.io.ObjectOutputStream out)
throws java.io.IOException
java.io.IOExceptionprotected void readBaseObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void initializeFrom(BaseDataSource source) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic 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 java.lang.String getMaxResultBuffer()
public void setMaxResultBuffer(java.lang.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 java.util.logging.Logger getParentLogger()
getParentLogger in interface javax.sql.CommonDataSourcepublic java.lang.String getXmlFactoryFactory()
public void setXmlFactoryFactory(java.lang.String xmlFactoryFactory)
public boolean isSsl()
public java.lang.String getSslfactoryarg()
public void setSslfactoryarg(java.lang.String arg)
public java.lang.String getSslcert()
public void setSslcert(java.lang.String file)
public java.lang.String getSslmode()
public void setSslmode(java.lang.String mode)
public java.lang.String getSslhostnameverifier()
public void setSslhostnameverifier(java.lang.String className)
public java.lang.String getSslkey()
public void setSslkey(java.lang.String file)
public java.lang.String getSslrootcert()
public void setSslrootcert(java.lang.String file)
public java.lang.String getSslpasswordcallback()
public void setSslpasswordcallback(java.lang.String className)
public java.lang.String getSslpassword()
public void setSslpassword(java.lang.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 © 2025 PostgreSQL Global Development Group. All rights reserved.