Package org.apache.lucene.util

# Class Constants

java.lang.Object
org.apache.lucene.util.Constants

public final class Constants extends Object
Some useful constants.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ReadAdvice`
  `DEFAULT_READADVICE`
  The default `ReadAdvice` used for opening index files.
  `static final boolean`
  `FREE_BSD`
  True iff running on FreeBSD
  `static final boolean`
  `HAS_FAST_COMPRESS_MASK_CAST`
  true iff we know Compress and Cast has fast throughput.
  `static final boolean`
  `HAS_FAST_SCALAR_FMA`
  true iff we know FMA has faster throughput than separate mul/add.
  `static final boolean`
  `HAS_FAST_VECTOR_FMA`
  true iff we know VFMA has faster throughput than separate vmul/vadd.
  `static final boolean`
  `IS_CLIENT_VM`
  True iff the Java runtime is a client runtime and C2 compiler is not enabled.
  `static final boolean`
  `IS_HOTSPOT_VM`
  True iff the Java VM is based on Hotspot and has the Hotspot MX bean readable by Lucene.
  `static final boolean`
  `IS_JVMCI_VM`
  True if jvmci is enabled (e.g.
  `static final String`
  `JAVA_VENDOR`
  The value of `System.getProperty("java.vendor")`.
  `static final boolean`
  `JRE_IS_64BIT`
  True iff running on a 64bit JVM
  `static final String`
  `JVM_NAME`
  JVM vendor name.
  `static final String`
  `JVM_VENDOR`
  JVM vendor info.
  `static final boolean`
  `LINUX`
  True iff running on Linux.
  `static final boolean`
  `MAC_OS_X`
  True iff running on Mac OS X
  `static final String`
  `OS_ARCH`
  The value of `System.getProperty("os.arch")`.
  `static final String`
  `OS_NAME`
  The value of `System.getProperty("os.name")`.
  `static final String`
  `OS_VERSION`
  The value of `System.getProperty("os.version")`.
  `static final boolean`
  `SUN_OS`
  True iff running on SunOS.
  `static final boolean`
  `WINDOWS`
  True iff running on Windows.

- ## Method Summary

  ### Methods inherited from class java.lang.Object

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

- ## Field Details

  - ### JVM_VENDOR

    public static final String JVM_VENDOR
    JVM vendor info.

  - ### JVM_NAME

    public static final String JVM_NAME
    JVM vendor name.

  - ### OS_NAME

    public static final String OS_NAME
    The value of `System.getProperty("os.name")`. *

  - ### LINUX

    public static final boolean LINUX
    True iff running on Linux.

  - ### WINDOWS

    public static final boolean WINDOWS
    True iff running on Windows.

  - ### SUN_OS

    public static final boolean SUN_OS
    True iff running on SunOS.

  - ### MAC_OS_X

    public static final boolean MAC_OS_X
    True iff running on Mac OS X

  - ### FREE_BSD

    public static final boolean FREE_BSD
    True iff running on FreeBSD

  - ### OS_ARCH

    public static final String OS_ARCH
    The value of `System.getProperty("os.arch")`.

  - ### OS_VERSION

    public static final String OS_VERSION
    The value of `System.getProperty("os.version")`.

  - ### JAVA_VENDOR

    public static final String JAVA_VENDOR
    The value of `System.getProperty("java.vendor")`.

  - ### IS_CLIENT_VM

    public static final boolean IS_CLIENT_VM
    True iff the Java runtime is a client runtime and C2 compiler is not enabled.

  - ### IS_HOTSPOT_VM

    public static final boolean IS_HOTSPOT_VM
    True 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_VM
    True if jvmci is enabled (e.g. graalvm)

  - ### JRE_IS_64BIT

    public static final boolean JRE_IS_64BIT
    True iff running on a 64bit JVM

  - ### HAS_FAST_VECTOR_FMA

    public static final boolean HAS_FAST_VECTOR_FMA
    true iff we know VFMA has faster throughput than separate vmul/vadd.

  - ### HAS_FAST_SCALAR_FMA

    public static final boolean HAS_FAST_SCALAR_FMA
    true iff we know FMA has faster throughput than separate mul/add.

  - ### HAS_FAST_COMPRESS_MASK_CAST

    public static final boolean HAS_FAST_COMPRESS_MASK_CAST
    true iff we know Compress and Cast has fast throughput.

  - ### DEFAULT_READADVICE

    public static final ReadAdvice DEFAULT_READADVICE
    The default `ReadAdvice` used for opening index files. It will be `ReadAdvice.NORMAL` by default, unless set by system property `org.apache.lucene.store.defaultReadAdvice`.