Package ai.platon.pulsar.common
Object AppContext
-
- All Implemented Interfaces:
public class AppContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumAppContext.State
-
Field Summary
Fields Modifier and Type Field Description private final IntegerNCPUprivate final StringHOST_NAMEprivate final StringUSERprivate final StringTMP_DIRprivate final StringUSER_DIRprivate final StringUSER_HOMEprivate final BooleanOS_IS_WSLprivate final BooleanOS_IS_VIRTprivate final BooleanOS_IS_LINUX_DESKTOPprivate final BooleanisGUIAvailableprivate final StringAPP_VERSIONprivate final StringAPP_NAME_RTprivate final StringAPP_NAMEprivate final StringAPP_IDENT_RTprivate final StringAPP_IDENTprivate final StringAPP_TMP_SPECIFIED_RTprivate final StringAPP_TMP_SPECIFIEDprivate final PathAPP_TMP_DIR_RTprivate final PathAPP_TMP_DIRprivate final PathAPP_PROC_TMP_DIR_RTprivate final PathAPP_PROC_TMP_DIRprivate final PathAPP_DATA_DIR_RTprivate final PathAPP_DATA_DIRprivate final AtomicReference<AppContext.State>stateprivate final BooleanisActivepublic final static AppContextINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitstart()final UnitshouldTerminate()final Unitterminate()final UnitendTermination()final IntegergetNCPU()final StringgetHOST_NAME()final StringgetUSER()final StringgetTMP_DIR()final StringgetUSER_DIR()final StringgetUSER_HOME()final BooleangetOS_IS_WSL()Check if the operating system is a Windows subsystem for linux final BooleangetOS_IS_VIRT()Check if the operating system is running on a virtual environment, e.g. final BooleangetOS_IS_LINUX_DESKTOP()Check if the operating system is a linux and desktop is available final BooleanisGUIAvailable()final StringgetAPP_VERSION()The application version final StringgetAPP_NAME_RT()final StringgetAPP_NAME()The application name, can be specified by system environment variable or system property. final StringgetAPP_IDENT_RT()final StringgetAPP_IDENT()The application identity string, can be specified by system environment variable or system property. final StringgetAPP_TMP_SPECIFIED_RT()final StringgetAPP_TMP_SPECIFIED()The user specified temp dir used by the application, can be specified by system environment variable or system property. final PathgetAPP_TMP_DIR_RT()final PathgetAPP_TMP_DIR()The temp directory used by all processes final PathgetAPP_PROC_TMP_DIR_RT()final PathgetAPP_PROC_TMP_DIR()The temp directory used by processes with APP_IDENT final PathgetAPP_DATA_DIR_RT()final PathgetAPP_DATA_DIR()final AtomicReference<AppContext.State>getState()The application's runtime state final BooleanisActive()-
-
Method Detail
-
shouldTerminate
final Unit shouldTerminate()
-
endTermination
final Unit endTermination()
-
getHOST_NAME
final String getHOST_NAME()
-
getTMP_DIR
final String getTMP_DIR()
-
getUSER_DIR
final String getUSER_DIR()
-
getUSER_HOME
final String getUSER_HOME()
-
getOS_IS_WSL
final Boolean getOS_IS_WSL()
Check if the operating system is a Windows subsystem for linux
-
getOS_IS_VIRT
final Boolean getOS_IS_VIRT()
Check if the operating system is running on a virtual environment, e.g., virtualbox, vmware, etc
-
getOS_IS_LINUX_DESKTOP
final Boolean getOS_IS_LINUX_DESKTOP()
Check if the operating system is a linux and desktop is available
-
isGUIAvailable
final Boolean isGUIAvailable()
-
getAPP_VERSION
final String getAPP_VERSION()
The application version
-
getAPP_NAME_RT
final String getAPP_NAME_RT()
-
getAPP_NAME
final String getAPP_NAME()
The application name, can be specified by system environment variable or system property.
-
getAPP_IDENT_RT
final String getAPP_IDENT_RT()
-
getAPP_IDENT
final String getAPP_IDENT()
The application identity string, can be specified by system environment variable or system property.
-
getAPP_TMP_SPECIFIED_RT
final String getAPP_TMP_SPECIFIED_RT()
-
getAPP_TMP_SPECIFIED
final String getAPP_TMP_SPECIFIED()
The user specified temp dir used by the application, can be specified by system environment variable or system property.
-
getAPP_TMP_DIR_RT
final Path getAPP_TMP_DIR_RT()
-
getAPP_TMP_DIR
final Path getAPP_TMP_DIR()
The temp directory used by all processes
-
getAPP_PROC_TMP_DIR_RT
final Path getAPP_PROC_TMP_DIR_RT()
-
getAPP_PROC_TMP_DIR
final Path getAPP_PROC_TMP_DIR()
The temp directory used by processes with APP_IDENT
-
getAPP_DATA_DIR_RT
final Path getAPP_DATA_DIR_RT()
-
getAPP_DATA_DIR
final Path getAPP_DATA_DIR()
-
getState
final AtomicReference<AppContext.State> getState()
The application's runtime state
-
-
-
-