Java Doc for VariablePoolConnectionManager.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » controller » connection » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » sequoia 2.10.9 » org.continuent.sequoia.controller.connection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.controller.connection.AbstractConnectionManager
      org.continuent.sequoia.controller.connection.AbstractPoolConnectionManager
         org.continuent.sequoia.controller.connection.VariablePoolConnectionManager

VariablePoolConnectionManager
public class VariablePoolConnectionManager extends AbstractPoolConnectionManager (Code)
This connection manager provides connection pooling with a dynamically adjustable pool size.

If the maximum number of active connections is not reached, the VariablePoolConnectionManager.getConnection() method creates a connection. Else, the execution is blocked until a connection is freed or the timeout expires. blocked until a connection is freed or the timeout expires.

Idle connections in the pool are removed after the timeout idleTimeout if the minimum pool size has not been reached.
author:
   Emmanuel Cecchet
author:
   Mathieu Peltier
author:
   Nicolas Modrzyk
version:
   1.0


Inner Class :protected class RemoveIdleConnectionsThread extends Thread


Constructor Summary
public  VariablePoolConnectionManager(String backendUrl, String backendName, String rLogin, String rPassword, String driverPath, String driverClassName, int minPoolSize, int maxPoolSize, int idleTimeout, int waitTimeout)
     Creates a new VariablePoolConnectionManager instance with the default minPoolSize(initial pool size to be initialized at startup).
Parameters:
  backendUrl - URL of the DatabaseBackend owning thisconnection manager
Parameters:
  backendName - name of the DatabaseBackend owning thisconnection manager
Parameters:
  rLogin - backend connection login to be used by this connectionmanager
Parameters:
  rPassword - backend connection password to be used by this connectionmanager
Parameters:
  driverPath - path for driver
Parameters:
  driverClassName - class name for driver
Parameters:
  minPoolSize - minimum pool size.
Parameters:
  maxPoolSize - maximum pool size.
public  VariablePoolConnectionManager(String backendUrl, String backendName, String rLogin, String rPassword, String driverPath, String driverClassName, int initPoolSize, int minPoolSize, int maxPoolSize, int idleTimeout, int waitTimeout)
     Creates a new VariablePoolConnectionManager instance.
Parameters:
  backendUrl - URL of the DatabaseBackend owning thisconnection manager
Parameters:
  backendName - name of the DatabaseBackend owning thisconnection manager
Parameters:
  rLogin - backend connection login to be used by this connectionmanager
Parameters:
  rPassword - backend connection password to be used by this connectionmanager
Parameters:
  driverPath - path for driver
Parameters:
  driverClassName - class name for driver
Parameters:
  initPoolSize - initial pool size to be intialized at startup
Parameters:
  minPoolSize - minimum pool size.
Parameters:
  maxPoolSize - maximum pool size.

Method Summary
protected  Objectclone()
    
public  AbstractConnectionManagerclone(String rLogin, String rPassword)
    
public synchronized  voiddeleteConnection(PooledConnection c)
    
protected  voiddoConnectionFinalization()
    
protected  voiddoConnectionInitialization()
    
protected synchronized  voiddoConnectionInitialization(int initPoolSize)
    
public synchronized  PooledConnectiongetConnection()
     Gets a connection from the pool.

If the current number of active connections is lower than the maximum pool size, a new connection is created.

public  intgetIdleTimeout()
     Gets the idle timeout.
public  intgetMaxPoolSize()
     Gets the max pool size.
public  intgetMinPoolSize()
     Gets the min pool size.
public  intgetWaitTimeout()
     Gets the wait timeout.
public  StringgetXmlImpl()
    
public  voidreleaseConnection(PooledConnection c)
    


Constructor Detail
VariablePoolConnectionManager
public VariablePoolConnectionManager(String backendUrl, String backendName, String rLogin, String rPassword, String driverPath, String driverClassName, int minPoolSize, int maxPoolSize, int idleTimeout, int waitTimeout)(Code)
Creates a new VariablePoolConnectionManager instance with the default minPoolSize(initial pool size to be initialized at startup).
Parameters:
  backendUrl - URL of the DatabaseBackend owning thisconnection manager
Parameters:
  backendName - name of the DatabaseBackend owning thisconnection manager
Parameters:
  rLogin - backend connection login to be used by this connectionmanager
Parameters:
  rPassword - backend connection password to be used by this connectionmanager
Parameters:
  driverPath - path for driver
Parameters:
  driverClassName - class name for driver
Parameters:
  minPoolSize - minimum pool size.
Parameters:
  maxPoolSize - maximum pool size. 0 means no limit.
Parameters:
  idleTimeout - time a connection can stay idle before begin released(removed from the pool) in seconds. 0 means no timeout: onceallocated, connections are never released.
Parameters:
  waitTimeout - maximum time to wait for a connection in seconds. 0means no timeout: waits until one connection is freed.



VariablePoolConnectionManager
public VariablePoolConnectionManager(String backendUrl, String backendName, String rLogin, String rPassword, String driverPath, String driverClassName, int initPoolSize, int minPoolSize, int maxPoolSize, int idleTimeout, int waitTimeout)(Code)
Creates a new VariablePoolConnectionManager instance.
Parameters:
  backendUrl - URL of the DatabaseBackend owning thisconnection manager
Parameters:
  backendName - name of the DatabaseBackend owning thisconnection manager
Parameters:
  rLogin - backend connection login to be used by this connectionmanager
Parameters:
  rPassword - backend connection password to be used by this connectionmanager
Parameters:
  driverPath - path for driver
Parameters:
  driverClassName - class name for driver
Parameters:
  initPoolSize - initial pool size to be intialized at startup
Parameters:
  minPoolSize - minimum pool size.
Parameters:
  maxPoolSize - maximum pool size. 0 means no limit.
Parameters:
  idleTimeout - time a connection can stay idle before begin released(removed from the pool) in seconds. 0 means no timeout: onceallocated, connections are never released.
Parameters:
  waitTimeout - maximum time to wait for a connection in seconds. 0means no timeout: waits until one connection is freed.




Method Detail
clone
protected Object clone() throws CloneNotSupportedException(Code)

See Also:   java.lang.Object.clone



clone
public AbstractConnectionManager clone(String rLogin, String rPassword)(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.clone(StringString)



deleteConnection
public synchronized void deleteConnection(PooledConnection c)(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.deleteConnection(org.continuent.sequoia.controller.connection.PooledConnection)



doConnectionFinalization
protected void doConnectionFinalization() throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.doConnectionFinalization



doConnectionInitialization
protected void doConnectionInitialization() throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.doConnectionInitialization



doConnectionInitialization
protected synchronized void doConnectionInitialization(int initPoolSize) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractPoolConnectionManager.doConnectionInitialization(int)



getConnection
public synchronized PooledConnection getConnection() throws UnreachableBackendException(Code)
Gets a connection from the pool.

If the current number of active connections is lower than the maximum pool size, a new connection is created. If the creation fails, this method waits for a connection to be freed.

If the maximum number of active connections is reached, this methods blocks until a connection is freed or the timeout expires. a connection from the pool or null if the timeouthas expired.
throws:
  UnreachableBackendException - if the backend must be disabled
See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.getConnection




getIdleTimeout
public int getIdleTimeout()(Code)
Gets the idle timeout. a int value.



getMaxPoolSize
public int getMaxPoolSize()(Code)
Gets the max pool size. a int value.



getMinPoolSize
public int getMinPoolSize()(Code)
Gets the min pool size. a int value.



getWaitTimeout
public int getWaitTimeout()(Code)
Gets the wait timeout. a int value.



getXmlImpl
public String getXmlImpl()(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.getXmlImpl



releaseConnection
public void releaseConnection(PooledConnection c)(Code)

See Also:   org.continuent.sequoia.controller.connection.AbstractConnectionManager.releaseConnection(org.continuent.sequoia.controller.connection.PooledConnection)



Fields inherited from org.continuent.sequoia.controller.connection.AbstractPoolConnectionManager
protected transient ArrayList activeConnections(Code)(Java Doc)
protected transient LinkedList freeConnections(Code)(Java Doc)
protected int poolSize(Code)(Java Doc)

Methods inherited from org.continuent.sequoia.controller.connection.AbstractPoolConnectionManager
protected synchronized void doConnectionFinalization() throws SQLException(Code)(Java Doc)
protected synchronized void doConnectionInitialization() throws SQLException(Code)(Java Doc)
protected synchronized void doConnectionInitialization(int initPoolSize) throws SQLException(Code)(Java Doc)
public synchronized void flagAllConnectionsForRenewal()(Code)(Java Doc)
public int getCurrentNumberOfConnections()(Code)(Java Doc)
protected int initConnections(int initPoolSize)(Code)(Java Doc)
protected void releasePersistentConnection(PooledConnection c)(Code)(Java Doc)

Fields inherited from org.continuent.sequoia.controller.connection.AbstractConnectionManager
protected String backendName(Code)(Java Doc)
protected String backendUrl(Code)(Java Doc)
protected String connectionTestStatement(Code)(Java Doc)
protected String driverClassName(Code)(Java Doc)
protected String driverPath(Code)(Java Doc)
protected int idlePersistentConnectionPingInterval(Code)(Java Doc)
protected boolean idlePersistentConnectionPingRunning(Code)(Java Doc)
protected LinkedList idlePersistentConnections(Code)(Java Doc)
protected boolean initialized(Code)(Java Doc)
protected boolean isShutdown(Code)(Java Doc)
static Trace logger(Code)(Java Doc)
protected IdlePersistentConnectionsPingerThread persistentConnectionPingerThread(Code)(Java Doc)
protected transient Hashtable persistentConnections(Code)(Java Doc)
protected LinkedList persistentConnectionsIdleTime(Code)(Java Doc)
protected String rLogin(Code)(Java Doc)
protected String rPassword(Code)(Java Doc)

Methods inherited from org.continuent.sequoia.controller.connection.AbstractConnectionManager
abstract protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
abstract public AbstractConnectionManager clone(String rLogin, String rPassword)(Code)(Java Doc)
protected void closeConnection(PooledConnection connection)(Code)(Java Doc)
public AbstractConnectionManager copy(String url, String name) throws Exception(Code)(Java Doc)
abstract public void deleteConnection(PooledConnection connection)(Code)(Java Doc)
public void deleteConnection(long transactionId)(Code)(Java Doc)
public void deletePersistentConnection(long persistentConnectionId)(Code)(Java Doc)
abstract protected void doConnectionFinalization() throws SQLException(Code)(Java Doc)
abstract protected void doConnectionInitialization() throws SQLException(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public void finalizeConnections() throws SQLException(Code)(Java Doc)
abstract public void flagAllConnectionsForRenewal()(Code)(Java Doc)
abstract protected PooledConnection getConnection() throws UnreachableBackendException(Code)(Java Doc)
public PooledConnection getConnectionForTransaction(long transactionId) throws UnreachableBackendException(Code)(Java Doc)
public Connection getConnectionFromDriver()(Code)(Java Doc)
abstract public int getCurrentNumberOfConnections()(Code)(Java Doc)
public String getDriverClassName()(Code)(Java Doc)
public String getDriverPath()(Code)(Java Doc)
public String getLogin()(Code)(Java Doc)
public String getPassword()(Code)(Java Doc)
public String getVLogin()(Code)(Java Doc)
public String getXml()(Code)(Java Doc)
abstract protected String getXmlImpl()(Code)(Java Doc)
final public void initializeConnections() throws SQLException(Code)(Java Doc)
public boolean isInitialized()(Code)(Java Doc)
protected void notifyPersistentConnectionPingerThread()(Code)(Java Doc)
public void registerConnectionForTransaction(PooledConnection c, long transactionId)(Code)(Java Doc)
abstract protected void releaseConnection(PooledConnection connection)(Code)(Java Doc)
public void releaseConnectionForTransaction(long transactionId)(Code)(Java Doc)
public void releaseConnectionInAutoCommit(AbstractRequest request, PooledConnection c)(Code)(Java Doc)
abstract protected void releasePersistentConnection(PooledConnection connection)(Code)(Java Doc)
public void releasePersistentConnectionInAutoCommit(long persistentConnectionId)(Code)(Java Doc)
public PooledConnection retrieveConnectionForTransaction(long transactionId)(Code)(Java Doc)
public PooledConnection retrieveConnectionInAutoCommit(AbstractRequest request) throws UnreachableBackendException(Code)(Java Doc)
public void setConnectionTestStatement(String connectionTestStatement)(Code)(Java Doc)
public void setVLogin(String login)(Code)(Java Doc)
public synchronized void shutdown()(Code)(Java Doc)
protected void stopPersistentConnectionPingerThread()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.