Java Doc for AbstractObjectPool.java in  » Collaboration » JacORB » org » jacorb » notification » util » 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 » Collaboration » JacORB » org.jacorb.notification.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jacorb.notification.util.AbstractObjectPool

All known Subclasses:   org.jacorb.notification.util.AbstractPoolablePool,
AbstractObjectPool
abstract public class AbstractObjectPool implements Runnable,Configurable(Code)
Abstract Base Class for Simple Pooling Mechanism. Subclasses must at least implement the method newInstance. To use a Object call lendObject. After use the Object must be returned with returnObject(Object). An Object must not be used after it has been returned to its pool! This class needs a two phase initialization: configure MUST be invoked before an instance can be used.
author:
   Alphonse Bendt
version:
   $Id: AbstractObjectPool.java,v 1.22 2006/06/14 11:57:54 alphonse.bendt Exp $


Field Summary
final public static  booleanDEBUG
    
final public static  intINITIAL_SIZE_DEFAULT
    
final public static  intLOWER_WATERMARK_DEFAULT
    
final public static  intMAXIMUM_SIZE_DEFAULT
    
final public static  intMAXIMUM_WATERMARK_DEFAULT
    
final public static  intSIZE_INCREASE_DEFAULT
    
final public static  longSLEEP
    
protected  Configurationconfig_
    
final protected  Loggerlogger_
    

Constructor Summary
protected  AbstractObjectPool(String name)
    
protected  AbstractObjectPool(String name, int lowerWatermark, int sizeincrease, int initialsize, int maxWatermark, int maximumSize)
    

Method Summary
public  voidconfigure(Configuration conf)
    
public  voiddispose()
     Release this Pool.
public  voiddoActivateObject(Object o)
     Is called before Object is returned to Client (lendObject).
public  voiddoDestroyObject(Object o)
     Is called if Pool is full and returned Object is discarded.
public  voiddoPassivateObject(Object o)
     Is called after Object is returned to pool.
protected  booleanisCreationAllowed()
     check if it is allowed to create more instances.
public  ObjectlendObject()
     lend an object from the pool.
abstract public  ObjectnewInstance()
     This method is called by the Pool to create a new Instance.
protected  voidpoolIsEmpty()
    
public  voidreturnObject(Object o)
     return an Object to the pool.
public  voidrun()
    
public  StringtoString()
    

Field Detail
DEBUG
final public static boolean DEBUG(Code)



INITIAL_SIZE_DEFAULT
final public static int INITIAL_SIZE_DEFAULT(Code)



LOWER_WATERMARK_DEFAULT
final public static int LOWER_WATERMARK_DEFAULT(Code)



MAXIMUM_SIZE_DEFAULT
final public static int MAXIMUM_SIZE_DEFAULT(Code)



MAXIMUM_WATERMARK_DEFAULT
final public static int MAXIMUM_WATERMARK_DEFAULT(Code)



SIZE_INCREASE_DEFAULT
final public static int SIZE_INCREASE_DEFAULT(Code)



SLEEP
final public static long SLEEP(Code)
time the cleaner thread sleeps between two cleanups



config_
protected Configuration config_(Code)



logger_
final protected Logger logger_(Code)




Constructor Detail
AbstractObjectPool
protected AbstractObjectPool(String name)(Code)



AbstractObjectPool
protected AbstractObjectPool(String name, int lowerWatermark, int sizeincrease, int initialsize, int maxWatermark, int maximumSize)(Code)




Method Detail
configure
public void configure(Configuration conf)(Code)



dispose
public void dispose()(Code)
Release this Pool.



doActivateObject
public void doActivateObject(Object o)(Code)
Is called before Object is returned to Client (lendObject). No Op



doDestroyObject
public void doDestroyObject(Object o)(Code)
Is called if Pool is full and returned Object is discarded. No Op.



doPassivateObject
public void doPassivateObject(Object o)(Code)
Is called after Object is returned to pool. No Op.



isCreationAllowed
protected boolean isCreationAllowed()(Code)
check if it is allowed to create more instances. preCondition: lock pool_ must be held.



lendObject
public Object lendObject()(Code)
lend an object from the pool.



newInstance
abstract public Object newInstance()(Code)
This method is called by the Pool to create a new Instance. Subclasses must override appropiately .



poolIsEmpty
protected void poolIsEmpty()(Code)



returnObject
public void returnObject(Object o)(Code)
return an Object to the pool.



run
public void run()(Code)



toString
public String toString()(Code)



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.