Class AprLibrary
- java.lang.Object
-
- org.apache.mina.transport.socket.apr.AprLibrary
-
class AprLibrary extends java.lang.ObjectInternal singleton used for initializing correctly the APR native library and the associated root memory pool. It'll finalize nicely the native resources (libraries and memory pools). Each memory pool used in the APR transport module needs to be children of the root pool AprLibrary#getRootPool().
-
-
Field Summary
Fields Modifier and Type Field Description private static AprLibrarylibraryprivate longpool
-
Constructor Summary
Constructors Modifier Constructor Description privateAprLibrary()APR library singleton constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()(package private) static AprLibrarygetInstance()get the shared instance of APR library, if none, initialize one(package private) longgetRootPool()get the package wide root pool, the mother of all the pool created in APR transport module.private static voidinitialize()initialize the APR Library by loading the associated native libraries and creating the associated singleton(package private) static booleanisInitialized()is the APR library was initialized.
-
-
-
Field Detail
-
library
private static AprLibrary library
-
pool
private final long pool
-
-
Method Detail
-
getInstance
static AprLibrary getInstance()
get the shared instance of APR library, if none, initialize one- Returns:
- the current APR library singleton
-
initialize
private static void initialize()
initialize the APR Library by loading the associated native libraries and creating the associated singleton
-
isInitialized
static boolean isInitialized()
is the APR library was initialized.- Returns:
- true if the Library is initialized, false otherwise
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
getRootPool
long getRootPool()
get the package wide root pool, the mother of all the pool created in APR transport module.- Returns:
- number identifying the root pool
-
-