Java Doc for RandomWaitPoolConnectionManager.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.RandomWaitPoolConnectionManager

RandomWaitPoolConnectionManager
public class RandomWaitPoolConnectionManager extends AbstractPoolConnectionManager (Code)
This connection manager waits when the pool is empty. Requests are stacked using the Java wait/notify mechanism. Therefore the FIFO order is not guaranteed and the first request to get the freed connection is the thread that gets elected by the scheduler.
author:
   Emmanuel Cecchet
author:
   Nicolas Modrzyk
version:
   1.0



Constructor Summary
public  RandomWaitPoolConnectionManager(String backendUrl, String backendName, String login, String password, String driverPath, String driverClassName, int poolSize, int timeout)
     Creates a new RandomWaitPoolConnectionManager instance.

Method Summary
protected  Objectclone()
    
public  AbstractConnectionManagerclone(String rLogin, String rPassword)
    
public synchronized  voiddeleteConnection(PooledConnection c)
    
public synchronized  PooledConnectiongetConnection()
     Gets a connection from the pool.
public  intgetTimeout()
     Gets the timeout.
public  StringgetXmlImpl()
    
public synchronized  voidreleaseConnection(PooledConnection c)
    


Constructor Detail
RandomWaitPoolConnectionManager
public RandomWaitPoolConnectionManager(String backendUrl, String backendName, String login, String password, String driverPath, String driverClassName, int poolSize, int timeout)(Code)
Creates a new RandomWaitPoolConnectionManager instance.
Parameters:
  backendUrl - URL of the DatabaseBackend owning thisconnection manager
Parameters:
  backendName - name of the DatabaseBackend owning thisconnection manager
Parameters:
  login - backend connection login to be used by this connection manager
Parameters:
  password - backend connection password to be used by this connectionmanager
Parameters:
  driverPath - path for driver
Parameters:
  driverClassName - class name for driver
Parameters:
  poolSize - size of the connection pool
Parameters:
  timeout - time to wait for a connection in seconds (0 means waitforever)




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)



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

If the pool is empty, 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




getTimeout
public int getTimeout()(Code)
Gets the timeout. a int value.



getXmlImpl
public String getXmlImpl()(Code)

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



releaseConnection
public synchronized 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.