Source Code Cross Referenced for Shm.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package org.apache.tomcat.jni;
019:
020:        import java.nio.ByteBuffer;
021:
022:        /** Shm
023:         *
024:         * @author Mladen Turk
025:         * @version $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
026:         */
027:
028:        public class Shm {
029:
030:            /**
031:             * Create and make accessable a shared memory segment.
032:             * <br />
033:             * A note about Anonymous vs. Named shared memory segments:<br />
034:             *         Not all plaforms support anonymous shared memory segments, but in
035:             *         some cases it is prefered over other types of shared memory
036:             *         implementations. Passing a NULL 'file' parameter to this function
037:             *         will cause the subsystem to use anonymous shared memory segments.
038:             *         If such a system is not available, APR_ENOTIMPL is returned.
039:             * <br />
040:             * A note about allocation sizes:<br />
041:             *         On some platforms it is necessary to store some metainformation
042:             *         about the segment within the actual segment. In order to supply
043:             *         the caller with the requested size it may be necessary for the
044:             *         implementation to request a slightly greater segment length
045:             *         from the subsystem. In all cases, the apr_shm_baseaddr_get()
046:             *         function will return the first usable byte of memory.
047:             * @param reqsize The desired size of the segment.
048:             * @param filename The file to use for shared memory on platforms that
049:             *        require it.
050:             * @param pool the pool from which to allocate the shared memory
051:             *        structure.
052:             * @return The created shared memory structure.
053:             *
054:             */
055:            public static native long create(long reqsize, String filename,
056:                    long pool) throws Error;
057:
058:            /**
059:             * Remove shared memory segment associated with a filename.
060:             * <br />
061:             * This function is only supported on platforms which support
062:             * name-based shared memory segments, and will return APR_ENOTIMPL on
063:             * platforms without such support.
064:             * @param filename The filename associated with shared-memory segment which
065:             *        needs to be removed
066:             * @param pool The pool used for file operations
067:             */
068:            public static native int remove(String filename, long pool);
069:
070:            /**
071:             * Destroy a shared memory segment and associated memory.
072:             * @param m The shared memory segment structure to destroy.
073:             */
074:            public static native int destroy(long m);
075:
076:            /**
077:             * Attach to a shared memory segment that was created
078:             * by another process.
079:             * @param filename The file used to create the original segment.
080:             *        (This MUST match the original filename.)
081:             * @param pool the pool from which to allocate the shared memory
082:             *        structure for this process.
083:             * @return The created shared memory structure.
084:             */
085:            public static native long attach(String filename, long pool)
086:                    throws Error;
087:
088:            /**
089:             * Detach from a shared memory segment without destroying it.
090:             * @param m The shared memory structure representing the segment
091:             *        to detach from.
092:             */
093:            public static native int detach(long m);
094:
095:            /**
096:             * Retrieve the base address of the shared memory segment.
097:             * NOTE: This address is only usable within the callers address
098:             * space, since this API does not guarantee that other attaching
099:             * processes will maintain the same address mapping.
100:             * @param m The shared memory segment from which to retrieve
101:             *        the base address.
102:             * @return address, aligned by APR_ALIGN_DEFAULT.
103:             */
104:            public static native long baseaddr(long m);
105:
106:            /**
107:             * Retrieve the length of a shared memory segment in bytes.
108:             * @param m The shared memory segment from which to retrieve
109:             *        the segment length.
110:             */
111:            public static native long size(long m);
112:
113:            /**
114:             * Retrieve new ByteBuffer base address of the shared memory segment.
115:             * NOTE: This address is only usable within the callers address
116:             * space, since this API does not guarantee that other attaching
117:             * processes will maintain the same address mapping.
118:             * @param m The shared memory segment from which to retrieve
119:             *        the base address.
120:             * @return address, aligned by APR_ALIGN_DEFAULT.
121:             */
122:            public static native ByteBuffer buffer(long m);
123:
124:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.