public class SystemConfig extends Object
SystemData gathers runtime metrics from the Java
platform.
This class determines whether various java.lang.management.*MXBean interfaces are queried to collect data.
These interfaces may not be available in all JVM implementations or may be restricted by the security manager. *
These properties should ideally be defined before invoking any method from this library, to ensure consistent behavior. Some properties can be modified dynamically at runtime, although care should be taken in concurrent environments.
This class is a utility holder and should not be instantiated.
| Modifier and Type | Field and Description |
|---|---|
String |
PROP_USE_CLASS_LOADING_MANAGED_BEAN |
String |
PROP_USE_COMPILATION_MANAGED_BEAN |
String |
PROP_USE_GARBAGE_COLLECTION_MANAGED_BEAN |
String |
PROP_USE_MEMORY_MANAGED_BEAN |
String |
PROP_USE_PLATFORM_MANAGED_BEAN |
boolean |
useClassLoadingManagedBean
Whether class loading metrics are retrieved from the
ClassLoadingMXBean. |
boolean |
useCompilationManagedBean
Whether JIT compiler metrics are retrieved from the
CompilationMXBean. |
boolean |
useGarbageCollectionManagedBean
Whether garbage collection metrics are retrieved from the
GarbageCollectorMXBeans. |
boolean |
useMemoryManagedBean
Whether memory usage metrics are retrieved from the
MemoryMXBean. |
boolean |
usePlatformManagedBean
Whether operating system metrics are retrieved from the
OperatingSystemMXBean. |
| Constructor and Description |
|---|
SystemConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
void |
reset()
Resets the configuration properties to their default values.
|
public final String PROP_USE_MEMORY_MANAGED_BEAN
public final String PROP_USE_CLASS_LOADING_MANAGED_BEAN
public final String PROP_USE_COMPILATION_MANAGED_BEAN
public final String PROP_USE_GARBAGE_COLLECTION_MANAGED_BEAN
public final String PROP_USE_PLATFORM_MANAGED_BEAN
public boolean useMemoryManagedBean
MemoryMXBean.
Controlled by the system property slf4jtoys.useMemoryManagedBean. Defaults to false. May be
changed at runtime.
public boolean useClassLoadingManagedBean
ClassLoadingMXBean.
Controlled by the system property slf4jtoys.useClassLoadingManagedBean. Defaults to false. May be
changed at runtime.
public boolean useCompilationManagedBean
CompilationMXBean.
Controlled by the system property slf4jtoys.useCompilationManagedBean. Defaults to false. May be
changed at runtime.
public boolean useGarbageCollectionManagedBean
GarbageCollectorMXBeans.
Controlled by the system property slf4jtoys.useGarbageCollectionManagedBean. Defaults to false.
May be changed at runtime.
public boolean usePlatformManagedBean
OperatingSystemMXBean.
Controlled by the system property slf4jtoys.usePlatformManagedBean. Defaults to false. May be
changed at runtime.
Copyright © 2010–2025. All rights reserved.