Class AprStatus
java.lang.Object
org.apache.tomcat.jni.AprStatus
Holds APR status without the need to load other classes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the OpenSSL version.static ReentrantReadWriteLockCode that changes the status of the APR library MUST hold the write lock while making any changes.static booleanReturns whether OpenSSL is in use.static booleanReturns whether APR is available.static booleanReturns whether APR has been initialized.static booleanReturns whether an APR instance has been created.static voidsetAprAvailable(boolean aprAvailable) Sets the APR available status.static voidsetAprInitialized(boolean aprInitialized) Sets the APR initialized status.static voidsetInstanceCreated(boolean instanceCreated) Sets the instance created status.static voidsetOpenSSLVersion(int openSSLVersion) Sets the OpenSSL version.static voidsetUseOpenSSL(boolean useOpenSSL) Sets whether to use OpenSSL.
-
Method Details
-
isAprInitialized
public static boolean isAprInitialized()Returns whether APR has been initialized.- Returns:
trueif APR has been initialized
-
isAprAvailable
public static boolean isAprAvailable()Returns whether APR is available.- Returns:
trueif APR is available
-
getUseOpenSSL
public static boolean getUseOpenSSL()Returns whether OpenSSL is in use.- Returns:
trueif OpenSSL is in use
-
isInstanceCreated
public static boolean isInstanceCreated()Returns whether an APR instance has been created.- Returns:
trueif an APR instance has been created
-
setAprInitialized
public static void setAprInitialized(boolean aprInitialized) Sets the APR initialized status.- Parameters:
aprInitialized- the APR initialized status to set
-
setAprAvailable
public static void setAprAvailable(boolean aprAvailable) Sets the APR available status.- Parameters:
aprAvailable- the APR available status to set
-
setUseOpenSSL
public static void setUseOpenSSL(boolean useOpenSSL) Sets whether to use OpenSSL.- Parameters:
useOpenSSL- the use OpenSSL status to set
-
setInstanceCreated
public static void setInstanceCreated(boolean instanceCreated) Sets the instance created status.- Parameters:
instanceCreated- the instance created status to set
-
getOpenSSLVersion
public static int getOpenSSLVersion()Returns the OpenSSL version.- Returns:
- the openSSLVersion
-
setOpenSSLVersion
public static void setOpenSSLVersion(int openSSLVersion) Sets the OpenSSL version.- Parameters:
openSSLVersion- the openSSLVersion to set
-
getStatusLock
Code that changes the status of the APR library MUST hold the write lock while making any changes.Code that needs the status to be consistent for an operation must hold the read lock for the duration of that operation.
- Returns:
- The read/write lock for APR library status
-