Java Doc for Pool.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » jni » 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 » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.jni 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tomcat.jni.Pool

Pool
public class Pool (Code)
Pool
author:
   Mladen Turk
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $




Method Summary
native public static  ByteBufferalloc(long p, int size)
    
native public static  ByteBuffercalloc(long p, int size)
    
native public static  voidcleanupForExec()
    
native public static  voidcleanupKill(long pool, long data)
    
native public static  longcleanupRegister(long pool, Object o)
    
native public static  voidclear(long pool)
     Clear all memory in the pool and run all the cleanups.
native public static  longcreate(long parent)
     Create a new pool.
Parameters:
  parent - The parent pool.
native public static  ObjectdataGet(long pool, String key)
     Return the data associated with the current pool.
native public static  intdataSet(long pool, String key, Object data)
     Set the data associated with the current pool
Parameters:
  data - The user data associated with the pool.
Parameters:
  key - The key to use for association
Parameters:
  pool - The current pool
Warning :The data to be attached to the pool should have a life spanat least as long as the pool it is being attached to.Object attached to the pool will be globaly referenceduntill the pool is cleared or dataSet is called with the null data.
native public static  voiddestroy(long pool)
     Destroy the pool.
native public static  booleanisAncestor(long a, long b)
    
native public static  voidnoteSubprocess(long a, long proc, int how)
     Register a process to be killed when a pool dies.
native public static  longparentGet(long pool)
     Get the parent pool of the specified pool.
Parameters:
  pool - The pool for retrieving the parent pool.



Method Detail
alloc
native public static ByteBuffer alloc(long p, int size)(Code)
Allocate a block of memory from a pool
Parameters:
  p - The pool to allocate from
Parameters:
  size - The amount of memory to allocate The ByteBuffer with allocated memory



calloc
native public static ByteBuffer calloc(long p, int size)(Code)
Allocate a block of memory from a pool and set all of the memory to 0
Parameters:
  p - The pool to allocate from
Parameters:
  size - The amount of memory to allocate The ByteBuffer with allocated memory



cleanupForExec
native public static void cleanupForExec()(Code)
Run all of the child_cleanups, so that any unnecessary files are closed because we are about to exec a new program



cleanupKill
native public static void cleanupKill(long pool, long data)(Code)
Remove a previously registered cleanup function
Parameters:
  pool - The pool remove the cleanup from
Parameters:
  data - The cleanup handler to remove from cleanup



cleanupRegister
native public static long cleanupRegister(long pool, Object o)(Code)
Register a function to be called when a pool is cleared or destroyed
Parameters:
  pool - The pool register the cleanup with
Parameters:
  o - The object to call when the pool is clearedor destroyed The cleanup handler.



clear
native public static void clear(long pool)(Code)
Clear all memory in the pool and run all the cleanups. This also destroys all subpools.
Parameters:
  pool - The pool to clearThis does not actually free the memory, it just allows the poolto re-use this memory for the next allocation.



create
native public static long create(long parent)(Code)
Create a new pool.
Parameters:
  parent - The parent pool. If this is 0, the new pool is a rootpool. If it is non-zero, the new pool will inherit allof its parent pool's attributes, except the apr_pool_t willbe a sub-pool. The pool we have just created.



dataGet
native public static Object dataGet(long pool, String key)(Code)
Return the data associated with the current pool.
Parameters:
  key - The key for the data to retrieve
Parameters:
  pool - The current pool.



dataSet
native public static int dataSet(long pool, String key, Object data)(Code)
Set the data associated with the current pool
Parameters:
  data - The user data associated with the pool.
Parameters:
  key - The key to use for association
Parameters:
  pool - The current pool
Warning :The data to be attached to the pool should have a life spanat least as long as the pool it is being attached to.Object attached to the pool will be globaly referenceduntill the pool is cleared or dataSet is called with the null data. APR Status code.



destroy
native public static void destroy(long pool)(Code)
Destroy the pool. This takes similar action as apr_pool_clear() and then frees all the memory. This will actually free the memory
Parameters:
  pool - The pool to destroy



isAncestor
native public static boolean isAncestor(long a, long b)(Code)
Determine if pool a is an ancestor of pool b
Parameters:
  a - The pool to search
Parameters:
  b - The pool to search for True if a is an ancestor of b, NULL is considered an ancestorof all pools.



noteSubprocess
native public static void noteSubprocess(long a, long proc, int how)(Code)
Register a process to be killed when a pool dies.
Parameters:
  a - The pool to use to define the processes lifetime
Parameters:
  proc - The process to register
Parameters:
  how - How to kill the process, one of:
APR_KILL_NEVER         -- process is never sent any signalsAPR_KILL_ALWAYS        -- process is sent SIGKILL on apr_pool_t cleanupAPR_KILL_AFTER_TIMEOUT -- SIGTERM, wait 3 seconds, SIGKILLAPR_JUST_WAIT          -- wait forever for the process to completeAPR_KILL_ONLY_ONCE     -- send SIGTERM and then wait



parentGet
native public static long parentGet(long pool)(Code)
Get the parent pool of the specified pool.
Parameters:
  pool - The pool for retrieving the parent pool. The parent of the given 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.