java.lang.Object
org.apache.lucene.util.Constants
Some useful constants.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanTrue iff running on FreeBSDstatic final booleantrue iff we know FMA has faster throughput than separate mul/add.static final booleantrue iff we know VFMA has faster throughput than separate vmul/vadd.private static final booleantrue if FMA likely means a cpu instruction and not BigDecimal logic.private static final booleantrue for an AMD cpu with SSE4a instructions.static final booleanTrue iff the Java runtime is a client runtime and C2 compiler is not enabled.static final booleanTrue iff the Java VM is based on Hotspot and has the Hotspot MX bean readable by Lucene.static final booleanTrue if jvmci is enabled (e.g.static final StringThe value ofSystem.getProperty("java.vendor").static final StringDeprecated.static final booleanTrue iff running on a 64bit JVMstatic final booleanDeprecated.This constant is useless and alwaystrue.static final booleanDeprecated.This constant is useless and alwaystrue.static final booleanDeprecated.This constant is useless and alwaystrue.static final StringJVM vendor name.static final StringDeprecated.To detect Java versions useRuntime.version()static final StringJVM vendor info.static final StringDeprecated.To detect Java versions useRuntime.version()static final booleanTrue iff running on Linux.static final booleanTrue iff running on Mac OS Xprivate static final intmaximum supported vectorsize.static final StringThe value ofSystem.getProperty("os.arch").static final StringThe value ofSystem.getProperty("os.name").static final StringThe value ofSystem.getProperty("os.version").static final booleanTrue iff running on SunOS.private static final Stringstatic final booleanTrue iff running on Windows. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> TdoPrivileged(PrivilegedAction<T> action) private static StringgetSysProp(String property) private static StringgetSysProp(String property, String def) private static booleanprivate static booleanprivate static booleanis64Bit()private static voidlogSecurityWarning(String property)
-
Field Details
-
UNKNOWN
- See Also:
-
JVM_VENDOR
JVM vendor info. -
JVM_NAME
JVM vendor name. -
JVM_VERSION
Deprecated.To detect Java versions useRuntime.version()Get the full version string of the current runtime. -
JVM_SPEC_VERSION
Deprecated.To detect Java versions useRuntime.version()Gets the specification version of the current runtime. This is the feature version converted to String.- See Also:
-
JAVA_VERSION
Deprecated.To detect Java versions useRuntime.version()The value ofSystem.getProperty("java.version"). -
OS_NAME
The value ofSystem.getProperty("os.name"). * -
LINUX
public static final boolean LINUXTrue iff running on Linux. -
WINDOWS
public static final boolean WINDOWSTrue iff running on Windows. -
SUN_OS
public static final boolean SUN_OSTrue iff running on SunOS. -
MAC_OS_X
public static final boolean MAC_OS_XTrue iff running on Mac OS X -
FREE_BSD
public static final boolean FREE_BSDTrue iff running on FreeBSD -
OS_ARCH
The value ofSystem.getProperty("os.arch"). -
OS_VERSION
The value ofSystem.getProperty("os.version"). -
JAVA_VENDOR
The value ofSystem.getProperty("java.vendor"). -
IS_CLIENT_VM
public static final boolean IS_CLIENT_VMTrue iff the Java runtime is a client runtime and C2 compiler is not enabled. -
IS_HOTSPOT_VM
public static final boolean IS_HOTSPOT_VMTrue iff the Java VM is based on Hotspot and has the Hotspot MX bean readable by Lucene. -
IS_JVMCI_VM
public static final boolean IS_JVMCI_VMTrue if jvmci is enabled (e.g. graalvm) -
JRE_IS_64BIT
public static final boolean JRE_IS_64BITTrue iff running on a 64bit JVM -
HAS_FMA
private static final boolean HAS_FMAtrue if FMA likely means a cpu instruction and not BigDecimal logic. -
MAX_VECTOR_SIZE
private static final int MAX_VECTOR_SIZEmaximum supported vectorsize. -
HAS_SSE4A
private static final boolean HAS_SSE4Atrue for an AMD cpu with SSE4a instructions. -
HAS_FAST_VECTOR_FMA
public static final boolean HAS_FAST_VECTOR_FMAtrue iff we know VFMA has faster throughput than separate vmul/vadd. -
HAS_FAST_SCALAR_FMA
public static final boolean HAS_FAST_SCALAR_FMAtrue iff we know FMA has faster throughput than separate mul/add. -
JRE_IS_MINIMUM_JAVA8
Deprecated.This constant is useless and alwaystrue. To detect Java versions useRuntime.version()Always true.- See Also:
-
JRE_IS_MINIMUM_JAVA9
Deprecated.This constant is useless and alwaystrue. To detect Java versions useRuntime.version()Always true.- See Also:
-
JRE_IS_MINIMUM_JAVA11
Deprecated.This constant is useless and alwaystrue. To detect Java versions useRuntime.version()Always true.- See Also:
-
-
Constructor Details
-
Constants
private Constants()
-
-
Method Details
-
is64Bit
private static boolean is64Bit() -
hasFastVectorFMA
private static boolean hasFastVectorFMA() -
hasFastScalarFMA
private static boolean hasFastScalarFMA() -
getSysProp
-
getSysProp
-
logSecurityWarning
-
doPrivileged
-
Runtime.version()