Java Doc for GenericPool.java in  » Database-JDBC-Connection-Pool » xapool » org » enhydra » jdbc » pool » 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 » xapool » org.enhydra.jdbc.pool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.enhydra.jdbc.pool.GenericPool

GenericPool
public class GenericPool (Code)
GenericPool is the main class of the Pool. It works with any kind of object that's implement PoolHelper (must provide specific operation on the specific object) Objects stored in hashtables are GenerationObject object. These objects allow to store multiples things in them, in particular, the generation number to identify the generation of an object.


Field Summary
final public static  intDEFAULT_DEADLOCKMAXWAIT
    
final public static  intDEFAULT_DEADLOCKRETRYWAIT
    
final public static  longDEFAULT_EXPIRATION
    
final public static  longDEFAULT_MAXLIFETIME
    
final public static  intDEFAULT_MAXSIZE
    
final public static  intDEFAULT_MINSIZE
    
final public static  longDEFAULT_SLEEPTIME
    
protected  intgeneration
     Generation number.
protected  Threadkeeper
    
protected  PoolKeeperpoolKeeper
    

Constructor Summary
public  GenericPool(PoolHelper helper)
     Creates an GenericPool with the default params.
public  GenericPool(PoolHelper helper, int initSize)
    
public  GenericPool(PoolHelper helper, int minSize, int maxSize, long lifeTime, long sleepTime, long maxLifeTime)
    

Method Summary
public synchronized  voidcheckIn(Object o)
    
public  ObjectcheckOut(String user, String password)
    
public synchronized  booleancheckOwner(GenerationObject genObject, String user, String password)
    
protected  voidcleanUp()
     Remove unusable objects from the pool, called by PoolKeeper Check the unlocked objects for expired members.
 voidexpireAll()
    
public synchronized  voidfullRemoveLockedObject(Object obj)
    
public  intgetCheckLevelObject()
    
public  intgetCount()
    
public  longgetDeadLockMaxWait()
    
public  longgetDeadLockRetryWait()
    
public  intgetGeneration()
    
public  longgetLifeTime()
    
public  HashtablegetLockedObject()
    
public  intgetLockedObjectCount()
    
public  HashtablegetLockedPool()
    
public  longgetMaxLifeTime()
    
public  intgetMaxSize()
    
public  intgetMinSize()
    
public  longgetSleepTime()
    
 JdbcThreadFactorygetThreadFactory()
    
public  intgetUnlockedObjectCount()
    
public  HashtablegetUnlockedPool()
    
public  booleanisDebug()
    
public  booleanisGC()
    
public synchronized  voidminimumObject()
    
public synchronized  voidminimumObject(String user, String password)
    
public  voidnextGeneration(Object obj)
     Allows to verify if objects from the pool - for the o generation - are valid or not.
public synchronized  voidremoveLockedObject(Object obj)
    
public synchronized  voidremoveUnlockedObject(GenerationObject obj)
    
public  voidsetCheckLevelObject(int level)
    
public  voidsetDeadLockMaxWait(long deadLock)
    
public  voidsetDeadLockRetryWait(long deadLockRetryWait)
    
public  voidsetDebug(boolean debug)
    
public  voidsetGC(boolean gc)
    
public  voidsetGeneration(int generation)
    
public  voidsetLifeTime(long lifeTime)
    
public  voidsetLogger(Logger alog)
     Outputs a log message to the log writer.
public  voidsetMaxLifeTime(long maxlifeTime)
    
public synchronized  voidsetMaxSize(int max)
    
public synchronized  voidsetMinSize(int min)
    
public  voidsetSleepTime(long sleepTime)
    
 voidsetThreadFactory(JdbcThreadFactory tf)
    
public synchronized  voidstart()
    
public  voidstop()
    
public  StringtoString()
    

Field Detail
DEFAULT_DEADLOCKMAXWAIT
final public static int DEFAULT_DEADLOCKMAXWAIT(Code)



DEFAULT_DEADLOCKRETRYWAIT
final public static int DEFAULT_DEADLOCKRETRYWAIT(Code)



DEFAULT_EXPIRATION
final public static long DEFAULT_EXPIRATION(Code)



DEFAULT_MAXLIFETIME
final public static long DEFAULT_MAXLIFETIME(Code)



DEFAULT_MAXSIZE
final public static int DEFAULT_MAXSIZE(Code)



DEFAULT_MINSIZE
final public static int DEFAULT_MINSIZE(Code)



DEFAULT_SLEEPTIME
final public static long DEFAULT_SLEEPTIME(Code)



generation
protected int generation(Code)
Generation number. When an error occurs, all objects of the same generation or earlier are dropped.



keeper
protected Thread keeper(Code)



poolKeeper
protected PoolKeeper poolKeeper(Code)




Constructor Detail
GenericPool
public GenericPool(PoolHelper helper)(Code)
Creates an GenericPool with the default params.



GenericPool
public GenericPool(PoolHelper helper, int initSize)(Code)



GenericPool
public GenericPool(PoolHelper helper, int minSize, int maxSize, long lifeTime, long sleepTime, long maxLifeTime)(Code)
Constructor, set the two hashtables and set by default the other values




Method Detail
checkIn
public synchronized void checkIn(Object o)(Code)
remove object from locked pool



checkOut
public Object checkOut(String user, String password) throws Exception(Code)
return pooled object



checkOwner
public synchronized boolean checkOwner(GenerationObject genObject, String user, String password)(Code)



cleanUp
protected void cleanUp()(Code)
Remove unusable objects from the pool, called by PoolKeeper Check the unlocked objects for expired members.



expireAll
void expireAll()(Code)
close all object in the unlocked and locked structures



fullRemoveLockedObject
public synchronized void fullRemoveLockedObject(Object obj)(Code)
removes an object for the locked pool, when an error has occurred



getCheckLevelObject
public int getCheckLevelObject()(Code)



getCount
public int getCount()(Code)



getDeadLockMaxWait
public long getDeadLockMaxWait()(Code)



getDeadLockRetryWait
public long getDeadLockRetryWait()(Code)



getGeneration
public int getGeneration()(Code)



getLifeTime
public long getLifeTime()(Code)



getLockedObject
public Hashtable getLockedObject()(Code)



getLockedObjectCount
public int getLockedObjectCount()(Code)
returns the current number of objects that are locked



getLockedPool
public Hashtable getLockedPool()(Code)



getMaxLifeTime
public long getMaxLifeTime()(Code)



getMaxSize
public int getMaxSize()(Code)



getMinSize
public int getMinSize()(Code)



getSleepTime
public long getSleepTime()(Code)



getThreadFactory
JdbcThreadFactory getThreadFactory()(Code)



getUnlockedObjectCount
public int getUnlockedObjectCount()(Code)
returns the current number of objects that are unlocked



getUnlockedPool
public Hashtable getUnlockedPool()(Code)



isDebug
public boolean isDebug()(Code)



isGC
public boolean isGC()(Code)



minimumObject
public synchronized void minimumObject()(Code)



minimumObject
public synchronized void minimumObject(String user, String password)(Code)



nextGeneration
public void nextGeneration(Object obj)(Code)
Allows to verify if objects from the pool - for the o generation - are valid or not. (only for the unlocked pool, to avoid to allocate non-valid object



removeLockedObject
public synchronized void removeLockedObject(Object obj)(Code)
removes an object for the locked pool, when an error has occurred



removeUnlockedObject
public synchronized void removeUnlockedObject(GenerationObject obj)(Code)



setCheckLevelObject
public void setCheckLevelObject(int level)(Code)
level are accepted between 0 and 4



setDeadLockMaxWait
public void setDeadLockMaxWait(long deadLock)(Code)



setDeadLockRetryWait
public void setDeadLockRetryWait(long deadLockRetryWait)(Code)



setDebug
public void setDebug(boolean debug)(Code)



setGC
public void setGC(boolean gc)(Code)



setGeneration
public void setGeneration(int generation)(Code)



setLifeTime
public void setLifeTime(long lifeTime)(Code)



setLogger
public void setLogger(Logger alog)(Code)
Outputs a log message to the log writer.



setMaxLifeTime
public void setMaxLifeTime(long maxlifeTime)(Code)



setMaxSize
public synchronized void setMaxSize(int max) throws Exception(Code)



setMinSize
public synchronized void setMinSize(int min) throws Exception(Code)



setSleepTime
public void setSleepTime(long sleepTime)(Code)



setThreadFactory
void setThreadFactory(JdbcThreadFactory tf)(Code)



start
public synchronized void start()(Code)
Start method, to initialize independant values of the pool



stop
public void stop()(Code)
switch off the pool



toString
public String toString()(Code)
returns information from the pool



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.