Package com.atlassian.jira.util.system
Class SystemInfoUtilsImpl
java.lang.Object
com.atlassian.jira.util.system.SystemInfoUtilsImpl
- All Implemented Interfaces:
SystemInfoUtils
Supply specific system information of the current JIRA installation. For Example: Returning the current database
type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
protected static final class
Nested classes/interfaces inherited from interface com.atlassian.jira.util.system.SystemInfoUtils
SystemInfoUtils.ClusteredDatabaseMetadata, SystemInfoUtils.DatabaseMetaData
-
Field Summary
Fields inherited from interface com.atlassian.jira.util.system.SystemInfoUtils
MEGABYTE
-
Constructor Summary
ConstructorsConstructorDescriptionSystemInfoUtilsImpl
(OfBizConnectionFactory connectionFactory) SystemInfoUtilsImpl
(OfBizConnectionFactory connectionFactory, Set<ClusteredDatabaseProbe> probes) -
Method Summary
Modifier and TypeMethodDescriptionlong
getClusteredDatabaseMetaData
(String databaseType) Returns anOptional
wrapping over the underlying database cluster metadata, if the database is recognised as a clustered database.long
long
long
long
List<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation>
long
long
long
long
getUptime
(ResourceBundle resourceBundle) long
long
long
-
Constructor Details
-
SystemInfoUtilsImpl
-
SystemInfoUtilsImpl
public SystemInfoUtilsImpl(OfBizConnectionFactory connectionFactory, Set<ClusteredDatabaseProbe> probes)
-
-
Method Details
-
getDatabaseType
- Specified by:
getDatabaseType
in interfaceSystemInfoUtils
-
getDbDescriptorValue
- Specified by:
getDbDescriptorValue
in interfaceSystemInfoUtils
-
getDbDescriptorLabel
- Specified by:
getDbDescriptorLabel
in interfaceSystemInfoUtils
-
getAppServer
- Specified by:
getAppServer
in interfaceSystemInfoUtils
-
getUptime
- Specified by:
getUptime
in interfaceSystemInfoUtils
-
getTotalMemory
public long getTotalMemory()- Specified by:
getTotalMemory
in interfaceSystemInfoUtils
-
getFreeMemory
public long getFreeMemory()- Specified by:
getFreeMemory
in interfaceSystemInfoUtils
-
getFreeAllocatedMemory
public long getFreeAllocatedMemory()- Specified by:
getFreeAllocatedMemory
in interfaceSystemInfoUtils
-
getUnAllocatedMemory
public long getUnAllocatedMemory()- Specified by:
getUnAllocatedMemory
in interfaceSystemInfoUtils
-
getAllocatedMemory
public long getAllocatedMemory()- Specified by:
getAllocatedMemory
in interfaceSystemInfoUtils
-
getUsedMemory
public long getUsedMemory()- Specified by:
getUsedMemory
in interfaceSystemInfoUtils
-
getMemoryPoolInformation
public List<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation> getMemoryPoolInformation()- Specified by:
getMemoryPoolInformation
in interfaceSystemInfoUtils
-
getTotalPermGenMemory
public long getTotalPermGenMemory()- Specified by:
getTotalPermGenMemory
in interfaceSystemInfoUtils
-
getFreePermGenMemory
public long getFreePermGenMemory()- Specified by:
getFreePermGenMemory
in interfaceSystemInfoUtils
-
getUsedPermGenMemory
public long getUsedPermGenMemory()- Specified by:
getUsedPermGenMemory
in interfaceSystemInfoUtils
-
getTotalNonHeapMemory
public long getTotalNonHeapMemory()- Specified by:
getTotalNonHeapMemory
in interfaceSystemInfoUtils
-
getFreeNonHeapMemory
public long getFreeNonHeapMemory()- Specified by:
getFreeNonHeapMemory
in interfaceSystemInfoUtils
-
getUsedNonHeapMemory
public long getUsedNonHeapMemory()- Specified by:
getUsedNonHeapMemory
in interfaceSystemInfoUtils
-
getJvmInputArguments
- Specified by:
getJvmInputArguments
in interfaceSystemInfoUtils
-
getDatabaseMetaData
public SystemInfoUtils.DatabaseMetaData getDatabaseMetaData() throws org.ofbiz.core.entity.GenericEntityException, JiraException, SQLException- Specified by:
getDatabaseMetaData
in interfaceSystemInfoUtils
- Throws:
org.ofbiz.core.entity.GenericEntityException
JiraException
SQLException
-
getClusteredDatabaseMetaData
public Optional<SystemInfoUtils.ClusteredDatabaseMetadata> getClusteredDatabaseMetaData(String databaseType) Returns anOptional
wrapping over the underlying database cluster metadata, if the database is recognised as a clustered database. A set of probes, each represented by aClusteredDatabaseProbe
, are registered and each probe is responsible to detect and gather cluster metadata information for a specific database type. The first probe in the set that matches with the databaseType parameter is used to retrieve metadata from the database. This behavior may change when we have multiple probes registered for a given database type.- Specified by:
getClusteredDatabaseMetaData
in interfaceSystemInfoUtils
- Parameters:
databaseType
- Type name of the database as defined inDatabaseType
- Returns:
- an
Optional
describingSystemInfoUtils.ClusteredDatabaseMetadata
of the underlying database, or an emptyOptional
if aClusteredDatabaseProbe
is not found or if it does not complete successfully
-
getInstallationType
- Specified by:
getInstallationType
in interfaceSystemInfoUtils
-