クラス PGPoolingDataSource
- すべての実装されたインタフェース:
Wrapper
,Referenceable
,CommonDataSource
,DataSource
- 直系の既知のサブクラス:
Jdbc3PoolingDataSource
,PoolingDataSource
If you're sure you want to use this, then you must set the properties dataSourceName, databaseName, user, and password (if required for the user). The settings for serverName, portNumber, initialConnections, and maxConnections are optional. Note that only connections for the default user will be pooled! Connections for other users will be normal non-pooled connections, and will not count against the maximum pool size limit.
If you put this DataSource in JNDI, and access it from different JVMs (or otherwise load this class from different ClassLoaders), you'll end up with one pool per ClassLoader or VM. This is another area where a server-specific implementation may provide advanced features, such as using a single pool across all VMs in a cluster.
This implementation supports JDK 1.5 and higher.
-
フィールドの概要
フィールド修飾子とタイプフィールド説明protected @Nullable String
推奨されていません。protected static ConcurrentMap<String,
PGPoolingDataSource> 推奨されていません。 -
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明protected void
addDataSource
(String dataSourceName) 推奨されていません。void
close()
推奨されていません。Closes this DataSource, and all the pooled connections, whether in use or not.protected PGConnectionPoolDataSource
推奨されていません。Creates the appropriate ConnectionPool to use for this DataSource.推奨されていません。Gets a connection from the connection pool.getConnection
(@Nullable String user, @Nullable String password) 推奨されていません。Gets a non-pooled connection, unless the user and password are the same as the default values for this connection pool.static @Nullable PGPoolingDataSource
getDataSource
(String name) 推奨されていません。@Nullable String
推奨されていません。Gets the name of this DataSource.推奨されていません。Gets a description of this DataSource.int
推奨されていません。Gets the number of connections that will be created when this DataSource is initialized.int
推奨されていません。Gets the maximum number of connections that the pool will allow.推奨されていません。Adds custom properties for this DataSource to the properties defined in the superclass.void
推奨されていません。Initializes this DataSource.protected boolean
推奨されていません。boolean
isWrapperFor
(Class<?> iface) 推奨されていません。protected void
推奨されていません。void
setDatabaseName
(@Nullable String databaseName) 推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.void
setDataSourceName
(String dataSourceName) 推奨されていません。Sets the name of this DataSource.void
setInitialConnections
(int initialConnections) 推奨されていません。Sets the number of connections that will be created when this DataSource is initialized.void
setMaxConnections
(int maxConnections) 推奨されていません。Sets the maximum number of connections that the pool will allow.void
setPassword
(@Nullable String password) 推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.void
setPortNumber
(int portNumber) 推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.void
setServerName
(String serverName) 推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.void
推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.<T> T
推奨されていません。クラスから継承されたメソッド org.postgresql.ds.common.BaseDataSource
createReference, getAdaptiveFetch, getAdaptiveFetchMaximum, getAdaptiveFetchMinimum, getAllowEncodingChanges, getApplicationName, getAssumeMinServerVersion, getAuthenticationPluginClassName, getAutosave, getBinaryTransfer, getBinaryTransferDisable, getBinaryTransferEnable, getCancelSignalTimeout, getCleanupSavepoints, getCmStatusMode, getConnectTimeout, getCurrentSchema, getDatabaseMetadataCacheFields, getDatabaseMetadataCacheFieldsMiB, getDatabaseName, getDefaultRowFetchSize, getDisableColumnSanitiser, getEnableFdwAcs, getEscapeSyntaxCallMode, getGroupStartupParameters, getGssEncMode, getGssLib, getGssResponseTimeout, getHideUnprivilegedObjects, getHostRecheckSeconds, getJaasApplicationName, getJaasLogin, getKerberosServerName, getLoadBalanceHosts, getLocalSocketAddress, getLoggerFile, getLoggerLevel, getLoginTimeout, getLogServerErrorDetail, getLogUnclosedConnections, getLogWriter, getMaxResultBuffer, getOptions, getParentLogger, getPassword, getPortNumber, getPortNumbers, getPreferQueryMode, getPreparedStatementCacheQueries, getPreparedStatementCacheSizeMiB, getPrepareThreshold, getProperty, getProperty, getProtocolVersion, getQuoteReturningIdentifiers, getReadOnly, getReadOnlyMode, getReceiveBufferSize, getRecvBufferSize, getReplication, getReWriteBatchedInserts, getSendBufferSize, getServerName, getServerNames, getShardName, getSocketFactory, getSocketFactoryArg, getSocketTimeout, getSsl, getSslcert, getSslCert, getSslfactory, getSslfactoryarg, getSslFactoryArg, getSslhostnameverifier, getSslHostnameVerifier, getSslkey, getSslKey, getSslmode, getSslMode, getSslpassword, getSslPassword, getSslpasswordcallback, getSslPasswordCallback, getSslResponseTimeout, getSslrootcert, getSslRootCert, getSslServerCertCn, getSspiServiceClass, getStringType, getTargetServerType, getTcpKeepAlive, getTcpNoDelay, getUnknownLength, getUrl, getURL, getUser, getUseSpNego, getXmlFactoryFactory, initializeFrom, isAllowEncodingChanges, isCleanupSavePoints, isColumnSanitiserDisabled, isDisableColumnSanitiser, isLoadBalanceHosts, isLogUnclosedConnections, isReadOnly, isReWriteBatchedInserts, isSsl, isTcpKeepAlive, readBaseObject, setAdaptiveFetch, setAdaptiveFetchMaximum, setAdaptiveFetchMinimum, setAllowEncodingChanges, setApplicationName, setAssumeMinServerVersion, setAuthenticationPluginClassName, setAutosave, setBinaryTransfer, setBinaryTransferDisable, setBinaryTransferEnable, setCancelSignalTimeout, setCleanupSavepoints, setCleanupSavePoints, setCmStatusMode, setConnectTimeout, setCurrentSchema, setDatabaseMetadataCacheFields, setDatabaseMetadataCacheFieldsMiB, setDefaultRowFetchSize, setDisableColumnSanitiser, setEnableFdwAcs, setEscapeSyntaxCallMode, setFromReference, setGroupStartupParameters, setGssEncMode, setGssLib, setGssResponseTimeout, setHideUnprivilegedObjects, setHostRecheckSeconds, setJaasApplicationName, setJaasLogin, setKerberosServerName, setLoadBalanceHosts, setLocalSocketAddress, setLoggerFile, setLoggerLevel, setLoginTimeout, setLogServerErrorDetail, setLogUnclosedConnections, setLogWriter, setMaxResultBuffer, setOptions, setPortNumbers, setPreferQueryMode, setPreparedStatementCacheQueries, setPreparedStatementCacheSizeMiB, setPrepareThreshold, setProperty, setProperty, setProtocolVersion, setQuoteReturningIdentifiers, setReadOnly, setReadOnlyMode, setReceiveBufferSize, setRecvBufferSize, setReplication, setReWriteBatchedInserts, setSendBufferSize, setServerNames, setShardName, setSocketFactory, setSocketFactoryArg, setSocketTimeout, setSsl, setSslcert, setSslCert, setSslfactory, setSslfactoryarg, setSslFactoryArg, setSslhostnameverifier, setSslHostnameVerifier, setSslkey, setSslKey, setSslmode, setSslMode, setSslpassword, setSslPassword, setSslpasswordcallback, setSslPasswordCallback, setSslResponseTimeout, setSslrootcert, setSslRootCert, setSslServerCertCn, setSspiServiceClass, setStringType, setTargetServerType, setTcpKeepAlive, setTcpNoDelay, setUnknownLength, setUrl, setURL, setUseSpNego, setXmlFactoryFactory, writeBaseObject
クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インタフェースから継承されたメソッド javax.sql.CommonDataSource
createShardingKeyBuilder, getParentLogger
インタフェースから継承されたメソッド javax.sql.DataSource
createConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
フィールド詳細
-
dataSources
推奨されていません。 -
dataSourceName
推奨されていません。
-
-
コンストラクタの詳細
-
PGPoolingDataSource
public PGPoolingDataSource()推奨されていません。
-
-
メソッドの詳細
-
getDataSource
推奨されていません。 -
getDescription
推奨されていません。Gets a description of this DataSource.- 定義:
getDescription
クラス内BaseDataSource
- 戻り値:
- description of this DataSource-ish thing
-
setServerName
推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.- オーバーライド:
setServerName
クラス内BaseDataSource
- パラメータ:
serverName
- name of the host the PostgreSQL database is running on- 例外:
IllegalStateException
- The Server Name cannot be changed after the DataSource has been used.
-
setDatabaseName
推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.- オーバーライド:
setDatabaseName
クラス内BaseDataSource
- パラメータ:
databaseName
- name of the PostgreSQL database- 例外:
IllegalStateException
- The Database Name cannot be changed after the DataSource has been used.
-
setUser
推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.- オーバーライド:
setUser
クラス内BaseDataSource
- パラメータ:
user
- user to connect as by default- 例外:
IllegalStateException
- The User cannot be changed after the DataSource has been used.
-
setPassword
推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.- オーバーライド:
setPassword
クラス内BaseDataSource
- パラメータ:
password
- password to connect with by default- 例外:
IllegalStateException
- The Password cannot be changed after the DataSource has been used.
-
setPortNumber
public void setPortNumber(int portNumber) 推奨されていません。Ensures the DataSource properties are not changed after the DataSource has been used.- オーバーライド:
setPortNumber
クラス内BaseDataSource
- パラメータ:
portNumber
- port which the PostgreSQL server is listening on for TCP/IP- 例外:
IllegalStateException
- The Port Number cannot be changed after the DataSource has been used.
-
getInitialConnections
public int getInitialConnections()推奨されていません。Gets the number of connections that will be created when this DataSource is initialized. If you do not call initialize explicitly, it will be initialized the first time a connection is drawn from it.- 戻り値:
- number of connections that will be created when this DataSource is initialized
-
setInitialConnections
public void setInitialConnections(int initialConnections) 推奨されていません。Sets the number of connections that will be created when this DataSource is initialized. If you do not call initialize explicitly, it will be initialized the first time a connection is drawn from it.- パラメータ:
initialConnections
- number of initial connections- 例外:
IllegalStateException
- The Initial Connections cannot be changed after the DataSource has been used.
-
getMaxConnections
public int getMaxConnections()推奨されていません。Gets the maximum number of connections that the pool will allow. If a request comes in and this many connections are in use, the request will block until a connection is available. Note that connections for a user other than the default user will not be pooled and don't count against this limit.- 戻り値:
- The maximum number of pooled connection allowed, or 0 for no maximum.
-
setMaxConnections
public void setMaxConnections(int maxConnections) 推奨されていません。Sets the maximum number of connections that the pool will allow. If a request comes in and this many connections are in use, the request will block until a connection is available. Note that connections for a user other than the default user will not be pooled and don't count against this limit.- パラメータ:
maxConnections
- The maximum number of pooled connection to allow, or 0 for no maximum.- 例外:
IllegalStateException
- The Maximum Connections cannot be changed after the DataSource has been used.
-
getDataSourceName
推奨されていません。Gets the name of this DataSource. This uniquely identifies the DataSource. You cannot use more than one DataSource in the same VM with the same name.- 戻り値:
- name of this DataSource
-
setDataSourceName
推奨されていません。Sets the name of this DataSource. This is required, and uniquely identifies the DataSource. You cannot create or use more than one DataSource in the same VM with the same name.- パラメータ:
dataSourceName
- datasource name- 例外:
IllegalStateException
- The Data Source Name cannot be changed after the DataSource has been used.IllegalArgumentException
- Another PoolingDataSource with the same dataSourceName already exists.
-
initialize
推奨されていません。Initializes this DataSource. If the initialConnections is greater than zero, that number of connections will be created. After this method is called, the DataSource properties cannot be changed. If you do not call this explicitly, it will be called the first time you get a connection from the DataSource.- 例外:
SQLException
- Occurs when the initialConnections is greater than zero, but the DataSource is not able to create enough physical connections.
-
isInitialized
protected boolean isInitialized()推奨されていません。 -
createConnectionPool
推奨されていません。Creates the appropriate ConnectionPool to use for this DataSource.- 戻り値:
- appropriate ConnectionPool to use for this DataSource
-
getConnection
public Connection getConnection(@Nullable String user, @Nullable String password) throws SQLException 推奨されていません。Gets a non-pooled connection, unless the user and password are the same as the default values for this connection pool.- 定義:
getConnection
インタフェース内DataSource
- オーバーライド:
getConnection
クラス内BaseDataSource
- パラメータ:
user
- userpassword
- password- 戻り値:
- A pooled connection.
- 例外:
SQLException
- Occurs when no pooled connection is available, and a new physical connection cannot be created.
-
getConnection
推奨されていません。Gets a connection from the connection pool.- 定義:
getConnection
インタフェース内DataSource
- オーバーライド:
getConnection
クラス内BaseDataSource
- 戻り値:
- A pooled connection.
- 例外:
SQLException
- Occurs when no pooled connection is available, and a new physical connection cannot be created.
-
close
public void close()推奨されていません。Closes this DataSource, and all the pooled connections, whether in use or not. -
removeStoredDataSource
protected void removeStoredDataSource()推奨されていません。 -
addDataSource
推奨されていません。 -
getReference
推奨されていません。Adds custom properties for this DataSource to the properties defined in the superclass.- 定義:
getReference
インタフェース内Referenceable
- オーバーライド:
getReference
クラス内BaseDataSource
- 例外:
NamingException
-
isWrapperFor
推奨されていません。- 定義:
isWrapperFor
インタフェース内Wrapper
- 例外:
SQLException
-
unwrap
推奨されていません。- 定義:
unwrap
インタフェース内Wrapper
- 例外:
SQLException
-