Java Doc for Pool.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » resource » pool » api » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.resource.pool.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.objectweb.jonas.resource.pool.api.Pool

All known Subclasses:   org.objectweb.jonas.resource.pool.lib.HArrayPool,
Pool
public interface Pool (Code)
The interface Pool defines an object that pools resources of any kind. Resources must be requested (getResource) and released (releaseResource) on demand. A Pool object can be parameterized along different dimensions. All these dimensions are represented by accessor methods (getters and setters) assigned to each of them:
  • A Timeout can be assigned to a Pool. It is used when no more resources are available and when the Pool has reached its maximum size. This is the timeout to wait for a free resource until exiting with an exception. It defaults to 0, which means waiting forever until a resource is freed. Its value should be greater or equal to 0 ; negative values are ignored (setTimeOut(-1) => NOP).
  • A MinSize can be assigned to a Pool. Its value should be greater or equal to 0, and smaller or equal to MaxSize. Values that do not match these conditions are ignored (e.g., setMinSize(-1) => NOP). This size means that there is always MinSize PoolResource allocated in this Pool. If PoolResource needs to be allocated when setting this size, "getPoolMatchFactory().createResource(null)" is called. Its default value is 0.
  • A MatchFactory (i.e., a PoolMatchFactory object) must be assigned to a Pool. It defines the way new PoolResource are created and the way a PoolResource of a Pool matches some "hints" properties when requested. It is mandatory for the Pool to be fully functional.
  • A MaxSize can be assigned to a Pool. Its value should be greater or equal to 0, and greater or equal to MinSize. Values that do not match these conditions are ignored (e.g., setMaxSize(-1) => NOP). Its default value is 0, thus it is mandatory to set this value for making the Poll functional.




Method Summary
 voidadjust()
    
 voidcloseAllConnections()
     Close all connections in the pool when server is shutting down.
 intgetBusyMaxRecent()
    
 intgetBusyMinRecent()
    
 intgetConnectionFailures()
    
 intgetConnectionLeaks()
    
public  intgetCurrentBusy()
    
public  intgetCurrentOpened()
    
 intgetCurrentWaiters()
    
 intgetInitSize()
    
public  intgetJdbcConnLevel()
    
public  StringgetJdbcTestStatement()
    
 PoolMatchFactorygetMatchFactory()
     getMatchFactory retrieves the PoolMatchFactory assigned to this Pool.
 intgetMaxAge()
    
 intgetMaxOpentime()
    
 intgetMaxSize()
     getMaxSize retrieves the maximum size assigned to this Pool.
 intgetMaxWaitTime()
     getMaxWaitTime gets the maximum number of seconds to wait for a connection in this Pool.
 intgetMaxWaiters()
     getMaxWaiters gets the maximum number of waiters for a connection in this Pool.
 intgetMinSize()
     getMinSize retrieves the minimum size assigned to this Pool.
 intgetOpenedCount()
    
 intgetRejectedFull()
    
 intgetRejectedOpen()
    
 intgetRejectedOther()
    
 intgetRejectedTimeout()
    
 ObjectgetResource(Object hints)
     getResource is used to allocate a Object from the Pool. Some hints are passed in order to specialise the matching or creation of Object.
Parameters:
  hints - Some properties to specialise the matching or the creationof Object.
 intgetSamplingPeriod()
     getSamplingPeriod gets the number of seconds between statistics sampling for this Pool.
 intgetServedOpen()
    
 intgetSize()
     getSize retrieves the current size of this Pool.
 longgetTimeout()
     getTimeout retrieves the timeout assigned to this Pool.
 intgetWaiterCount()
    
 intgetWaitersHigh()
    
 intgetWaitersHighRecent()
    
 longgetWaitingHigh()
    
 longgetWaitingHighRecent()
    
 longgetWaitingTime()
    
 voidreleaseResource(Object resource, boolean destroy, boolean adjustment)
     releaseResource releases a Object in order to allow the Pool to recycle this Object.
 voidsampling()
    
 voidsetInitSize(int initsize)
     setInitSize creates initsize resoures to this Pool.
public  voidsetJdbcConnLevel(int jdbcConnLevel)
    
public  voidsetJdbcTestStatement(String jdbcTestStatement)
    
 voidsetMatchFactory(PoolMatchFactory pmf)
     setMatchFactory assigns a PoolMatchFactory to this Pool.
 voidsetMaxAge(int maxAge)
    
 voidsetMaxOpentime(int maxOpentime)
    
 voidsetMaxSize(int maxsize)
     setMaxSize assigns a maximum size to this Pool.
 voidsetMaxWaitTime(int maxWaitTime)
     setMaxWaitTime sets the maximum number of seconds to wait for a connection in this Pool.
 voidsetMaxWaiters(int maxWaiters)
     setMaxWaiters sets the maximum number of waiters for a connection in this Pool.
 voidsetMinSize(int minsize)
     setMinSize assigns a minimum size to this Pool.
 voidsetSamplingPeriod(int samplingPeriod)
     setSamplingPeriod sets the number of seconds between statistics sampling for this Pool.
 voidsetTimeout(long crto)
     setTimeout assigns a timeout to this Pool.
 voidstartMonitor()
     startMonitor starts the pool monitor for this Pool.
 voidvalidateMCs()
    



Method Detail
adjust
void adjust() throws Exception(Code)
adjust checks the age of the entries and removes them if they are too old
throws:
  Exception - if an error occurs



closeAllConnections
void closeAllConnections()(Code)
Close all connections in the pool when server is shutting down.



getBusyMaxRecent
int getBusyMaxRecent()(Code)
maximum nb of busy connections in last sampling period



getBusyMinRecent
int getBusyMinRecent()(Code)
minimum nb of busy connections in last sampling period



getConnectionFailures
int getConnectionFailures()(Code)
int number of connection failures on open



getConnectionLeaks
int getConnectionLeaks()(Code)
int number of connection leaks



getCurrentBusy
public int getCurrentBusy()(Code)
int number of busy connections



getCurrentOpened
public int getCurrentOpened()(Code)
int number of opened connections



getCurrentWaiters
int getCurrentWaiters()(Code)
current number of connection waiters



getInitSize
int getInitSize()(Code)
init The pool init size.



getJdbcConnLevel
public int getJdbcConnLevel()(Code)
getJdbcConnLevel gets the jdbc connection level int jdbc connection level specified



getJdbcTestStatement
public String getJdbcTestStatement()(Code)
getJdbcTestStatement gets the JDBC test statement for this pool String JDBC test statement



getMatchFactory
PoolMatchFactory getMatchFactory()(Code)
getMatchFactory retrieves the PoolMatchFactory assigned to this Pool. The PoolMatchFactory currently assigned to this Pool.



getMaxAge
int getMaxAge()(Code)
getMaxAge gets the max age for a pool entry int max number of minutes to keep a connectionin the pool.



getMaxOpentime
int getMaxOpentime()(Code)
getMaxOpentime gets the max age for a pool entry int max number of minutes to keep a connectionin the pool.



getMaxSize
int getMaxSize()(Code)
getMaxSize retrieves the maximum size assigned to this Pool. The maximum size currently assigned to this Pool.



getMaxWaitTime
int getMaxWaitTime()(Code)
getMaxWaitTime gets the maximum number of seconds to wait for a connection in this Pool. int maximum number of seconds to wait



getMaxWaiters
int getMaxWaiters()(Code)
getMaxWaiters gets the maximum number of waiters for a connection in this Pool. return int maximum number of waiters



getMinSize
int getMinSize()(Code)
getMinSize retrieves the minimum size assigned to this Pool. The minimum size currently assigned to this Pool.



getOpenedCount
int getOpenedCount()(Code)
int number of physical jdbc connection opened



getRejectedFull
int getRejectedFull()(Code)
int number of open calls that were rejected due to waiter overflow



getRejectedOpen
int getRejectedOpen()(Code)
int number of open calls that were rejected



getRejectedOther
int getRejectedOther()(Code)
int number of open calls that were rejected



getRejectedTimeout
int getRejectedTimeout()(Code)
int number of open calls that were rejected by timeout



getResource
Object getResource(Object hints) throws Exception(Code)
getResource is used to allocate a Object from the Pool. Some hints are passed in order to specialise the matching or creation of Object.
Parameters:
  hints - Some properties to specialise the matching or the creationof Object. The Object allocated from the Pool.
throws:
  Exception - if an error occurs



getSamplingPeriod
int getSamplingPeriod()(Code)
getSamplingPeriod gets the number of seconds between statistics sampling for this Pool. int number of seconds between samplings



getServedOpen
int getServedOpen()(Code)
int number of connection served



getSize
int getSize()(Code)
getSize retrieves the current size of this Pool. The current size of this Pool.



getTimeout
long getTimeout()(Code)
getTimeout retrieves the timeout assigned to this Pool. The timeout currently assigned to this Pool.



getWaiterCount
int getWaiterCount()(Code)
total nb of waiters since the datasource creation



getWaitersHigh
int getWaitersHigh()(Code)
maximum nb of waiters since the datasource creation



getWaitersHighRecent
int getWaitersHighRecent()(Code)
maximum nb of waiters in last sampling period



getWaitingHigh
long getWaitingHigh()(Code)
max waiting time since the datasource creation



getWaitingHighRecent
long getWaitingHighRecent()(Code)
max waiting time in last sampling period



getWaitingTime
long getWaitingTime()(Code)
total waiting time since the datasource creation



releaseResource
void releaseResource(Object resource, boolean destroy, boolean adjustment) throws Exception(Code)
releaseResource releases a Object in order to allow the Pool to recycle this Object.
Parameters:
  resource - The Object to be released.
Parameters:
  destroy - boolean to remove the object from the pool anddestroy it
Parameters:
  adjustment - boolean to determine if a pool adjustment should be done
throws:
  Exception - if an error occurs



sampling
void sampling() throws Exception(Code)
sampling updates the interval pool information
throws:
  Exception - if an error occurs



setInitSize
void setInitSize(int initsize) throws Exception(Code)
setInitSize creates initsize resoures to this Pool.
Parameters:
  initsize - The init size to be created.
throws:
  Exception - if an error occurs



setJdbcConnLevel
public void setJdbcConnLevel(int jdbcConnLevel)(Code)
setJdbcConnLevel sets the JDBC connection level for this pool
Parameters:
  jdbcConnLevel - int JDBC connection level



setJdbcTestStatement
public void setJdbcTestStatement(String jdbcTestStatement)(Code)
setJdbcTestStatement sets the JDBC test statement for this pool
Parameters:
  jdbcTestStatement - String JDBC test statement



setMatchFactory
void setMatchFactory(PoolMatchFactory pmf)(Code)
setMatchFactory assigns a PoolMatchFactory to this Pool.
Parameters:
  pmf - The PoolMatchFactory to be assigned.



setMaxAge
void setMaxAge(int maxAge)(Code)
setMaxAge sets the max age for a pool entry
Parameters:
  maxAge - int max number of minutes to keep a connectionin the pool.



setMaxOpentime
void setMaxOpentime(int maxOpentime)(Code)
setMaxOpentime sets the max age for an entry to be opened
Parameters:
  maxOpentime - int max number of minutes to keep a connectionopened.



setMaxSize
void setMaxSize(int maxsize) throws Exception(Code)
setMaxSize assigns a maximum size to this Pool.
Parameters:
  maxsize - int maximum size to be assigned.
throws:
  Exception - if an error occurs



setMaxWaitTime
void setMaxWaitTime(int maxWaitTime)(Code)
setMaxWaitTime sets the maximum number of seconds to wait for a connection in this Pool.
Parameters:
  maxWaitTime - int maximum number of seconds to wait



setMaxWaiters
void setMaxWaiters(int maxWaiters)(Code)
setMaxWaiters sets the maximum number of waiters for a connection in this Pool.
Parameters:
  maxWaiters - int maximum number of waiters



setMinSize
void setMinSize(int minsize) throws Exception(Code)
setMinSize assigns a minimum size to this Pool.
Parameters:
  minsize - int minimum size to be assigned.
throws:
  Exception - if an error occurs



setSamplingPeriod
void setSamplingPeriod(int samplingPeriod)(Code)
setSamplingPeriod sets the number of seconds between statistics sampling for this Pool.
Parameters:
  samplingPeriod - int number of seconds between samplings



setTimeout
void setTimeout(long crto)(Code)
setTimeout assigns a timeout to this Pool.
Parameters:
  crto - long timeout to be assigned.



startMonitor
void startMonitor()(Code)
startMonitor starts the pool monitor for this Pool.



validateMCs
void validateMCs() throws Exception(Code)
validateMCs validates ManagedConnections in Pool every 10 minutes
throws:
  Exception - if an error occurs



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