Top Description Fields Constructors Methods
net.sf.ehcache.pool.sizeof

public sealed Enum JvmInformation

extends Enum<JvmInformation>
Class Inheritance
Imports
java.lang.management.GarbageCollectorMXBean, .ManagementFactory, javax.management.MBeanServer, .ObjectName, javax.management.openmbean.CompositeData, org.slf4j.Logger, .LoggerFactory

Detects and represents JVM-specific properties that relate to the memory data model for java objects that are useful for size of calculations.
Authors
jhouse, Chris Dennis

Field Summary

Modifier and TypeField and Description
public static final JvmInformation
CURRENT_JVM_INFORMATION

The JvmInformation instance representing the current JVM

private static final long
public static final JvmInformation
HOTSPOT_32_BIT

Represents HotSpot 32-bit

public static final JvmInformation
HOTSPOT_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 32-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC

public static final JvmInformation
HOTSPOT_64_BIT

Represents 64-Bit HotSpot JVM

public static final JvmInformation
HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS

Represents 64-Bit HotSpot JVM with Compressed OOPs

public static final JvmInformation
HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit HotSpot JVM with Compressed OOPs and Concurrent Mark-and-Sweep GC

public static final JvmInformation
HOTSPOT_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC

public static final JvmInformation
IBM_32_BIT

Represents IBM 32-bit

public static final JvmInformation
IBM_64_BIT

Represents 64-Bit IBM JVM (with no reference compression)

public static final JvmInformation
IBM_64_BIT_WITH_COMPRESSED_REFS

Represents 64-Bit IBM JVM (with reference compression)

private static final Logger
public static final JvmInformation
OPENJDK_32_BIT

Represents OpenJDK 32-bit

public static final JvmInformation
OPENJDK_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 32-Bit OpenJDK JVM with Concurrent Mark-and-Sweep GC

public static final JvmInformation
OPENJDK_64_BIT

Represents 64-Bit OpenJDK JVM

public static final JvmInformation
OPENJDK_64_BIT_WITH_COMPRESSED_OOPS

Represents 64-Bit OpenJDK JVM with Compressed OOPs

public static final JvmInformation
OPENJDK_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit OpenJDK JVM with Compressed OOPs and Concurrent Mark-and-Sweep GC

public static final JvmInformation
OPENJDK_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit OpenJDK JVM with Concurrent Mark-and-Sweep GC

private JvmInformation
private static final long
public static final JvmInformation
UNKNOWN_32_BIT

Represents Generic 32-bit

public static final JvmInformation
UNKNOWN_64_BIT

Represents 64-Bit Generic JVM

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static JvmInformation
private static JvmInformation
private static JvmInformation
public int
getAgentSizeOfAdjustment()

The size of the jvm-specific agent result adjustment in bytes.

public int
getFieldOffsetAdjustment()

The size of the jvm-specific field offset adjustment in bytes.

private static String
public int
getJavaPointerSize()

Size of a java pointer in bytes on this runtime (that differs when compressedOops are being used)

public abstract String
getJvmDescription()

A human-readable description of the JVM and its relevant enabled options.Os

private static JvmInformation
getJvmInformation()

Determine the JvmInformation for the current JVM.

public int
getMinimumObjectSize()

Minimal size an object will occupy on the heap in bytes.

public int
getObjectAlignment()

Object alignment / padding in bytes

public int
getObjectHeaderSize()

The size of an object header in bytes.

private static String
public int
getPointerSize()

Size of a pointer in bytes on this runtime

private static boolean
public static boolean

Returns:

true, if Hotspot
isHotspot
()

Returns true if VM vendor is Hotspot

private static boolean
private static boolean
public static boolean

Returns:

true, if IBM
isIBM
()

Returns true if VM vendor is IBM

private static boolean
public static boolean

Returns:

true, if OpenJDK
isOpenJDK
()

Returns true if VM vendor is OpenJDK

public static boolean

Returns:

true, if OS X
isOSX
()

Return true if the VM's vendor is Apple

public boolean
supportsAgentSizeOf()

Whether the jvm can support AgentSizeOf implementation.

public boolean
supportsReflectionSizeOf()

Whether the jvm can support ReflectionSizeOf implementation.

public boolean
supportsUnsafeSizeOf()

Whether the jvm can support UnsafeSizeOf implementation.

public static JvmInformation
public static JvmInformation[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CURRENT_JVM_INFORMATIONback to summary
public static final JvmInformation CURRENT_JVM_INFORMATION

The JvmInformation instance representing the current JVM

FIFTY_SEVEN_GBback to summary
private static final long FIFTY_SEVEN_GB
HOTSPOT_32_BITback to summary
public static final JvmInformation HOTSPOT_32_BIT

Represents HotSpot 32-bit

HOTSPOT_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation HOTSPOT_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 32-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC

HOTSPOT_64_BITback to summary
public static final JvmInformation HOTSPOT_64_BIT

Represents 64-Bit HotSpot JVM

HOTSPOT_64_BIT_WITH_COMPRESSED_OOPSback to summary
public static final JvmInformation HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS

Represents 64-Bit HotSpot JVM with Compressed OOPs

HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit HotSpot JVM with Compressed OOPs and Concurrent Mark-and-Sweep GC

HOTSPOT_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation HOTSPOT_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC

IBM_32_BITback to summary
public static final JvmInformation IBM_32_BIT

Represents IBM 32-bit

IBM_64_BITback to summary
public static final JvmInformation IBM_64_BIT

Represents 64-Bit IBM JVM (with no reference compression)

IBM_64_BIT_WITH_COMPRESSED_REFSback to summary
public static final JvmInformation IBM_64_BIT_WITH_COMPRESSED_REFS

Represents 64-Bit IBM JVM (with reference compression)

LOGGERback to summary
private static final Logger LOGGER
OPENJDK_32_BITback to summary
public static final JvmInformation OPENJDK_32_BIT

Represents OpenJDK 32-bit

OPENJDK_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation OPENJDK_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 32-Bit OpenJDK JVM with Concurrent Mark-and-Sweep GC

OPENJDK_64_BITback to summary
public static final JvmInformation OPENJDK_64_BIT

Represents 64-Bit OpenJDK JVM

OPENJDK_64_BIT_WITH_COMPRESSED_OOPSback to summary
public static final JvmInformation OPENJDK_64_BIT_WITH_COMPRESSED_OOPS

Represents 64-Bit OpenJDK JVM with Compressed OOPs

OPENJDK_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation OPENJDK_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit OpenJDK JVM with Compressed OOPs and Concurrent Mark-and-Sweep GC

OPENJDK_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEPback to summary
public static final JvmInformation OPENJDK_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP

Represents 64-Bit OpenJDK JVM with Concurrent Mark-and-Sweep GC

parentback to summary
private JvmInformation parent
TWENTY_FIVE_GBback to summary
private static final long TWENTY_FIVE_GB
UNKNOWN_32_BITback to summary
public static final JvmInformation UNKNOWN_32_BIT

Represents Generic 32-bit

UNKNOWN_64_BITback to summary
public static final JvmInformation UNKNOWN_64_BIT

Represents 64-Bit Generic JVM

Constructor Detail

JvmInformationback to summary
private JvmInformation(JvmInformation parent)

Method Detail

detectHotSpotback to summary
private static JvmInformation detectHotSpot()
detectIBMback to summary
private static JvmInformation detectIBM()
detectOpenJDKback to summary
private static JvmInformation detectOpenJDK()
getAgentSizeOfAdjustmentback to summary
public int getAgentSizeOfAdjustment()

The size of the jvm-specific agent result adjustment in bytes.

getFieldOffsetAdjustmentback to summary
public int getFieldOffsetAdjustment()

The size of the jvm-specific field offset adjustment in bytes.

getHotSpotVmOptionValueback to summary
private static String getHotSpotVmOptionValue(String name)
getJavaPointerSizeback to summary
public int getJavaPointerSize()

Size of a java pointer in bytes on this runtime (that differs when compressedOops are being used)

getJvmDescriptionback to summary
public abstract String getJvmDescription()

A human-readable description of the JVM and its relevant enabled options.Os

getJvmInformationback to summary
private static JvmInformation getJvmInformation()

Determine the JvmInformation for the current JVM.

getMinimumObjectSizeback to summary
public int getMinimumObjectSize()

Minimal size an object will occupy on the heap in bytes.

getObjectAlignmentback to summary
public int getObjectAlignment()

Object alignment / padding in bytes

getObjectHeaderSizeback to summary
public int getObjectHeaderSize()

The size of an object header in bytes.

getPlatformMBeanAttributeback to summary
private static String getPlatformMBeanAttribute(String beanName, String attrName)
getPointerSizeback to summary
public int getPointerSize()

Size of a pointer in bytes on this runtime

is64Bitback to summary
private static boolean is64Bit()
isHotspotback to summary
public static boolean isHotspot()

Returns true if VM vendor is Hotspot

Returns:boolean

true, if Hotspot

isHotspotCompressedOopsback to summary
private static boolean isHotspotCompressedOops()
isHotspotConcurrentMarkSweepGCback to summary
private static boolean isHotspotConcurrentMarkSweepGC()
isIBMback to summary
public static boolean isIBM()

Returns true if VM vendor is IBM

Returns:boolean

true, if IBM

isIBMCompressedRefsback to summary
private static boolean isIBMCompressedRefs()
isOpenJDKback to summary
public static boolean isOpenJDK()

Returns true if VM vendor is OpenJDK

Returns:boolean

true, if OpenJDK

isOSXback to summary
public static boolean isOSX()

Return true if the VM's vendor is Apple

Returns:boolean

true, if OS X

supportsAgentSizeOfback to summary
public boolean supportsAgentSizeOf()

Whether the jvm can support AgentSizeOf implementation.

supportsReflectionSizeOfback to summary
public boolean supportsReflectionSizeOf()

Whether the jvm can support ReflectionSizeOf implementation.

supportsUnsafeSizeOfback to summary
public boolean supportsUnsafeSizeOf()

Whether the jvm can support UnsafeSizeOf implementation.

valueOfback to summary
public static JvmInformation valueOf(String name)
valuesback to summary
public static JvmInformation[] values()