Package org.jboss.modules
Class ModuleLoader.MXBeanImpl
java.lang.Object
org.jboss.modules.ModuleLoader.MXBeanImpl
- All Implemented Interfaces:
ModuleLoaderMXBean
- Enclosing class:
- ModuleLoader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
doDumpModuleInformation
(String name, StringBuilder b) private List<DependencyInfo>
doGetDependencies
(Module module) private List<ResourceLoaderInfo>
doGetResourceLoaders
(Module module) Dump all information for all modules as a string.dumpModuleInformation
(String name) Dump all information for a single module as a string.int
Get the number of classes defined in this module loader.long
Get the estimated CPU time (in nanoseconds) spent defining classes for this loader.getDependencies
(String name) Get the dependencies of the named module.Get a description of this module loader.long
Get the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.int
Get the number of modules currently loaded.long
Get the estimated CPU time (in nanoseconds) spent loading modules into this loader.getModuleDescription
(String name) Get the complete description of this module.private ModuleLoader
getModulePathsInfo
(String name, boolean exports) Get a paths map for a given module.int
Get the number of times a class was defined by two threads at once.getResourceLoaders
(String name) Get the resource loaders of the named module.int
Get the number of times that dependencies of a module from this loader have been scanned.private Module
loadModule
(String name, ModuleLoader loader) Obtain a list of the current module names.void
refreshResourceLoaders
(String name) Attempt to refresh the resource loaders of the given module.void
Attempt to relink the given module.boolean
unloadModule
(String name) Attempt to unload a module from this module loader.
-
Field Details
-
reference
-
-
Constructor Details
-
MXBeanImpl
MXBeanImpl(ModuleLoader moduleLoader, ObjectName objectName)
-
-
Method Details
-
getDescription
Description copied from interface:ModuleLoaderMXBean
Get a description of this module loader.- Specified by:
getDescription
in interfaceModuleLoaderMXBean
- Returns:
- a description of this module loader
-
getLinkTime
public long getLinkTime()Description copied from interface:ModuleLoaderMXBean
Get the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.- Specified by:
getLinkTime
in interfaceModuleLoaderMXBean
- Returns:
- the estimated time in nanoseconds
-
getLoadTime
public long getLoadTime()Description copied from interface:ModuleLoaderMXBean
Get the estimated CPU time (in nanoseconds) spent loading modules into this loader.- Specified by:
getLoadTime
in interfaceModuleLoaderMXBean
- Returns:
- the estimated time in nanoseconds
-
getClassDefineTime
public long getClassDefineTime()Description copied from interface:ModuleLoaderMXBean
Get the estimated CPU time (in nanoseconds) spent defining classes for this loader.- Specified by:
getClassDefineTime
in interfaceModuleLoaderMXBean
- Returns:
- the estimated time in nanoseconds
-
getScanCount
public int getScanCount()Description copied from interface:ModuleLoaderMXBean
Get the number of times that dependencies of a module from this loader have been scanned.- Specified by:
getScanCount
in interfaceModuleLoaderMXBean
- Returns:
- the count
-
getLoadedModuleCount
public int getLoadedModuleCount()Description copied from interface:ModuleLoaderMXBean
Get the number of modules currently loaded.- Specified by:
getLoadedModuleCount
in interfaceModuleLoaderMXBean
- Returns:
- the loaded module count
-
getRaceCount
public int getRaceCount()Description copied from interface:ModuleLoaderMXBean
Get the number of times a class was defined by two threads at once.- Specified by:
getRaceCount
in interfaceModuleLoaderMXBean
- Returns:
- the race count
-
getClassCount
public int getClassCount()Description copied from interface:ModuleLoaderMXBean
Get the number of classes defined in this module loader.- Specified by:
getClassCount
in interfaceModuleLoaderMXBean
- Returns:
- the number of classes defined in this module loader
-
queryLoadedModuleNames
Description copied from interface:ModuleLoaderMXBean
Obtain a list of the current module names.- Specified by:
queryLoadedModuleNames
in interfaceModuleLoaderMXBean
- Returns:
- the module names
-
dumpAllModuleInformation
Description copied from interface:ModuleLoaderMXBean
Dump all information for all modules as a string.- Specified by:
dumpAllModuleInformation
in interfaceModuleLoaderMXBean
- Returns:
- the string of module information
-
dumpModuleInformation
Description copied from interface:ModuleLoaderMXBean
Dump all information for a single module as a string.- Specified by:
dumpModuleInformation
in interfaceModuleLoaderMXBean
- Parameters:
name
- the module name- Returns:
- the string of module information
-
doDumpModuleInformation
-
unloadModule
Description copied from interface:ModuleLoaderMXBean
Attempt to unload a module from this module loader.- Specified by:
unloadModule
in interfaceModuleLoaderMXBean
- Parameters:
name
- the string form of the module identifier to unload- Returns:
true
if the module was unloaded
-
refreshResourceLoaders
Description copied from interface:ModuleLoaderMXBean
Attempt to refresh the resource loaders of the given module.- Specified by:
refreshResourceLoaders
in interfaceModuleLoaderMXBean
- Parameters:
name
- the name of the module to refresh
-
relink
Description copied from interface:ModuleLoaderMXBean
Attempt to relink the given module.- Specified by:
relink
in interfaceModuleLoaderMXBean
- Parameters:
name
- the name of the module to relink
-
getDependencies
Description copied from interface:ModuleLoaderMXBean
Get the dependencies of the named module.- Specified by:
getDependencies
in interfaceModuleLoaderMXBean
- Parameters:
name
- the module name- Returns:
- the module's dependencies
-
doGetDependencies
-
getResourceLoaders
Description copied from interface:ModuleLoaderMXBean
Get the resource loaders of the named module.- Specified by:
getResourceLoaders
in interfaceModuleLoaderMXBean
- Parameters:
name
- the module name- Returns:
- the module's resource loaders
-
doGetResourceLoaders
-
getModuleDescription
Description copied from interface:ModuleLoaderMXBean
Get the complete description of this module.- Specified by:
getModuleDescription
in interfaceModuleLoaderMXBean
- Parameters:
name
- the module name- Returns:
- the module description
-
getModulePathsInfo
Description copied from interface:ModuleLoaderMXBean
Get a paths map for a given module.- Specified by:
getModulePathsInfo
in interfaceModuleLoaderMXBean
- Parameters:
name
- the module nameexports
-true
for the exported paths,false
for all paths- Returns:
- the paths map information
-
loadModule
-
getModuleLoader
-