# Class AprStatus

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

public class AprStatus extends Object
Holds APR status without the need to load other classes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `getOpenSSLVersion()`
  Returns the OpenSSL version.
  `static ReentrantReadWriteLock`
  `getStatusLock()`
  Code that changes the status of the APR library MUST hold the write lock while making any changes.
  `static boolean`
  `getUseOpenSSL()`
  Returns whether OpenSSL is in use.
  `static boolean`
  `isAprAvailable()`
  Returns whether APR is available.
  `static boolean`
  `isAprInitialized()`
  Returns whether APR has been initialized.
  `static boolean`
  `isInstanceCreated()`
  Returns whether an APR instance has been created.
  `static void`
  `setAprAvailable(boolean aprAvailable)`
  Sets the APR available status.
  `static void`
  `setAprInitialized(boolean aprInitialized)`
  Sets the APR initialized status.
  `static void`
  `setInstanceCreated(boolean instanceCreated)`
  Sets the instance created status.
  `static void`
  `setOpenSSLVersion(int openSSLVersion)`
  Sets the OpenSSL version.
  `static void`
  `setUseOpenSSL(boolean useOpenSSL)`
  Sets whether to use OpenSSL.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### isAprInitialized

    public static boolean isAprInitialized()
    Returns whether APR has been initialized.
    Returns:
      `true` if APR has been initialized

  - ### isAprAvailable

    public static boolean isAprAvailable()
    Returns whether APR is available.
    Returns:
      `true` if APR is available

  - ### getUseOpenSSL

    public static boolean getUseOpenSSL()
    Returns whether OpenSSL is in use.
    Returns:
      `true` if OpenSSL is in use

  - ### isInstanceCreated

    public static boolean isInstanceCreated()
    Returns whether an APR instance has been created.
    Returns:
      `true` if 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

    public static ReentrantReadWriteLock 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