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 classprotected static final classNested 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 TypeMethodDescriptionlonggetClusteredDatabaseMetaData(String databaseType) Returns anOptionalwrapping over the underlying database cluster metadata, if the database is recognised as a clustered database.longlonglonglongList<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation> longlonglonglonggetUptime(ResourceBundle resourceBundle) longlonglong
-
Constructor Details
-
SystemInfoUtilsImpl
-
SystemInfoUtilsImpl
public SystemInfoUtilsImpl(OfBizConnectionFactory connectionFactory, Set<ClusteredDatabaseProbe> probes)
-
-
Method Details
-
getDatabaseType
- Specified by:
getDatabaseTypein interfaceSystemInfoUtils
-
getDbDescriptorValue
- Specified by:
getDbDescriptorValuein interfaceSystemInfoUtils
-
getDbDescriptorLabel
- Specified by:
getDbDescriptorLabelin interfaceSystemInfoUtils
-
getAppServer
- Specified by:
getAppServerin interfaceSystemInfoUtils
-
getUptime
- Specified by:
getUptimein interfaceSystemInfoUtils
-
getTotalMemory
public long getTotalMemory()- Specified by:
getTotalMemoryin interfaceSystemInfoUtils
-
getFreeMemory
public long getFreeMemory()- Specified by:
getFreeMemoryin interfaceSystemInfoUtils
-
getFreeAllocatedMemory
public long getFreeAllocatedMemory()- Specified by:
getFreeAllocatedMemoryin interfaceSystemInfoUtils
-
getUnAllocatedMemory
public long getUnAllocatedMemory()- Specified by:
getUnAllocatedMemoryin interfaceSystemInfoUtils
-
getAllocatedMemory
public long getAllocatedMemory()- Specified by:
getAllocatedMemoryin interfaceSystemInfoUtils
-
getUsedMemory
public long getUsedMemory()- Specified by:
getUsedMemoryin interfaceSystemInfoUtils
-
getMemoryPoolInformation
public List<com.atlassian.jdk.utilities.runtimeinformation.MemoryInformation> getMemoryPoolInformation()- Specified by:
getMemoryPoolInformationin interfaceSystemInfoUtils
-
getTotalPermGenMemory
public long getTotalPermGenMemory()- Specified by:
getTotalPermGenMemoryin interfaceSystemInfoUtils
-
getFreePermGenMemory
public long getFreePermGenMemory()- Specified by:
getFreePermGenMemoryin interfaceSystemInfoUtils
-
getUsedPermGenMemory
public long getUsedPermGenMemory()- Specified by:
getUsedPermGenMemoryin interfaceSystemInfoUtils
-
getTotalNonHeapMemory
public long getTotalNonHeapMemory()- Specified by:
getTotalNonHeapMemoryin interfaceSystemInfoUtils
-
getFreeNonHeapMemory
public long getFreeNonHeapMemory()- Specified by:
getFreeNonHeapMemoryin interfaceSystemInfoUtils
-
getUsedNonHeapMemory
public long getUsedNonHeapMemory()- Specified by:
getUsedNonHeapMemoryin interfaceSystemInfoUtils
-
getJvmInputArguments
- Specified by:
getJvmInputArgumentsin interfaceSystemInfoUtils
-
getDatabaseMetaData
public SystemInfoUtils.DatabaseMetaData getDatabaseMetaData() throws org.ofbiz.core.entity.GenericEntityException, JiraException, SQLException- Specified by:
getDatabaseMetaDatain interfaceSystemInfoUtils- Throws:
org.ofbiz.core.entity.GenericEntityExceptionJiraExceptionSQLException
-
getClusteredDatabaseMetaData
public Optional<SystemInfoUtils.ClusteredDatabaseMetadata> getClusteredDatabaseMetaData(String databaseType) Returns anOptionalwrapping 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:
getClusteredDatabaseMetaDatain interfaceSystemInfoUtils- Parameters:
databaseType- Type name of the database as defined inDatabaseType- Returns:
- an
OptionaldescribingSystemInfoUtils.ClusteredDatabaseMetadataof the underlying database, or an emptyOptionalif aClusteredDatabaseProbeis not found or if it does not complete successfully
-
getInstallationType
- Specified by:
getInstallationTypein interfaceSystemInfoUtils
-