Package org.jboss.modules
Class ModuleLoader.MXBeanImpl
- java.lang.Object
-
- org.jboss.modules.ModuleLoader.MXBeanImpl
-
- All Implemented Interfaces:
ModuleLoaderMXBean
- Enclosing class:
- ModuleLoader
static final class ModuleLoader.MXBeanImpl extends java.lang.Object implements ModuleLoaderMXBean
-
-
Field Summary
Fields Modifier and Type Field Description private Reference<ModuleLoader,javax.management.ObjectName>reference
-
Constructor Summary
Constructors Constructor Description MXBeanImpl(ModuleLoader moduleLoader, javax.management.ObjectName objectName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoDumpModuleInformation(java.lang.String name, java.lang.StringBuilder b)private java.util.List<DependencyInfo>doGetDependencies(Module module)private java.util.List<ResourceLoaderInfo>doGetResourceLoaders(Module module)java.lang.StringdumpAllModuleInformation()Dump all information for all modules as a string.java.lang.StringdumpModuleInformation(java.lang.String name)Dump all information for a single module as a string.intgetClassCount()Get the number of classes defined in this module loader.longgetClassDefineTime()Get the estimated CPU time (in nanoseconds) spent defining classes for this loader.java.util.List<DependencyInfo>getDependencies(java.lang.String name)Get the dependencies of the named module.java.lang.StringgetDescription()Get a description of this module loader.longgetLinkTime()Get the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.intgetLoadedModuleCount()Get the number of modules currently loaded.longgetLoadTime()Get the estimated CPU time (in nanoseconds) spent loading modules into this loader.ModuleInfogetModuleDescription(java.lang.String name)Get the complete description of this module.private ModuleLoadergetModuleLoader()java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>>getModulePathsInfo(java.lang.String name, boolean exports)Get a paths map for a given module.intgetRaceCount()Get the number of times a class was defined by two threads at once.java.util.List<ResourceLoaderInfo>getResourceLoaders(java.lang.String name)Get the resource loaders of the named module.intgetScanCount()Get the number of times that dependencies of a module from this loader have been scanned.private ModuleloadModule(java.lang.String name, ModuleLoader loader)java.util.List<java.lang.String>queryLoadedModuleNames()Obtain a list of the current module names.voidrefreshResourceLoaders(java.lang.String name)Attempt to refresh the resource loaders of the given module.voidrelink(java.lang.String name)Attempt to relink the given module.booleanunloadModule(java.lang.String name)Attempt to unload a module from this module loader.
-
-
-
Field Detail
-
reference
private final Reference<ModuleLoader,javax.management.ObjectName> reference
-
-
Constructor Detail
-
MXBeanImpl
MXBeanImpl(ModuleLoader moduleLoader, javax.management.ObjectName objectName)
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ModuleLoaderMXBeanGet a description of this module loader.- Specified by:
getDescriptionin interfaceModuleLoaderMXBean- Returns:
- a description of this module loader
-
getLinkTime
public long getLinkTime()
Description copied from interface:ModuleLoaderMXBeanGet the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.- Specified by:
getLinkTimein interfaceModuleLoaderMXBean- Returns:
- the estimated time in nanoseconds
-
getLoadTime
public long getLoadTime()
Description copied from interface:ModuleLoaderMXBeanGet the estimated CPU time (in nanoseconds) spent loading modules into this loader.- Specified by:
getLoadTimein interfaceModuleLoaderMXBean- Returns:
- the estimated time in nanoseconds
-
getClassDefineTime
public long getClassDefineTime()
Description copied from interface:ModuleLoaderMXBeanGet the estimated CPU time (in nanoseconds) spent defining classes for this loader.- Specified by:
getClassDefineTimein interfaceModuleLoaderMXBean- Returns:
- the estimated time in nanoseconds
-
getScanCount
public int getScanCount()
Description copied from interface:ModuleLoaderMXBeanGet the number of times that dependencies of a module from this loader have been scanned.- Specified by:
getScanCountin interfaceModuleLoaderMXBean- Returns:
- the count
-
getLoadedModuleCount
public int getLoadedModuleCount()
Description copied from interface:ModuleLoaderMXBeanGet the number of modules currently loaded.- Specified by:
getLoadedModuleCountin interfaceModuleLoaderMXBean- Returns:
- the loaded module count
-
getRaceCount
public int getRaceCount()
Description copied from interface:ModuleLoaderMXBeanGet the number of times a class was defined by two threads at once.- Specified by:
getRaceCountin interfaceModuleLoaderMXBean- Returns:
- the race count
-
getClassCount
public int getClassCount()
Description copied from interface:ModuleLoaderMXBeanGet the number of classes defined in this module loader.- Specified by:
getClassCountin interfaceModuleLoaderMXBean- Returns:
- the number of classes defined in this module loader
-
queryLoadedModuleNames
public java.util.List<java.lang.String> queryLoadedModuleNames()
Description copied from interface:ModuleLoaderMXBeanObtain a list of the current module names.- Specified by:
queryLoadedModuleNamesin interfaceModuleLoaderMXBean- Returns:
- the module names
-
dumpAllModuleInformation
public java.lang.String dumpAllModuleInformation()
Description copied from interface:ModuleLoaderMXBeanDump all information for all modules as a string.- Specified by:
dumpAllModuleInformationin interfaceModuleLoaderMXBean- Returns:
- the string of module information
-
dumpModuleInformation
public java.lang.String dumpModuleInformation(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanDump all information for a single module as a string.- Specified by:
dumpModuleInformationin interfaceModuleLoaderMXBean- Parameters:
name- the module name- Returns:
- the string of module information
-
doDumpModuleInformation
private void doDumpModuleInformation(java.lang.String name, java.lang.StringBuilder b)
-
unloadModule
public boolean unloadModule(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanAttempt to unload a module from this module loader.- Specified by:
unloadModulein interfaceModuleLoaderMXBean- Parameters:
name- the string form of the module identifier to unload- Returns:
trueif the module was unloaded
-
refreshResourceLoaders
public void refreshResourceLoaders(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanAttempt to refresh the resource loaders of the given module.- Specified by:
refreshResourceLoadersin interfaceModuleLoaderMXBean- Parameters:
name- the name of the module to refresh
-
relink
public void relink(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanAttempt to relink the given module.- Specified by:
relinkin interfaceModuleLoaderMXBean- Parameters:
name- the name of the module to relink
-
getDependencies
public java.util.List<DependencyInfo> getDependencies(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanGet the dependencies of the named module.- Specified by:
getDependenciesin interfaceModuleLoaderMXBean- Parameters:
name- the module name- Returns:
- the module's dependencies
-
doGetDependencies
private java.util.List<DependencyInfo> doGetDependencies(Module module)
-
getResourceLoaders
public java.util.List<ResourceLoaderInfo> getResourceLoaders(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanGet the resource loaders of the named module.- Specified by:
getResourceLoadersin interfaceModuleLoaderMXBean- Parameters:
name- the module name- Returns:
- the module's resource loaders
-
doGetResourceLoaders
private java.util.List<ResourceLoaderInfo> doGetResourceLoaders(Module module)
-
getModuleDescription
public ModuleInfo getModuleDescription(java.lang.String name)
Description copied from interface:ModuleLoaderMXBeanGet the complete description of this module.- Specified by:
getModuleDescriptionin interfaceModuleLoaderMXBean- Parameters:
name- the module name- Returns:
- the module description
-
getModulePathsInfo
public java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>> getModulePathsInfo(java.lang.String name, boolean exports)Description copied from interface:ModuleLoaderMXBeanGet a paths map for a given module.- Specified by:
getModulePathsInfoin interfaceModuleLoaderMXBean- Parameters:
name- the module nameexports-truefor the exported paths,falsefor all paths- Returns:
- the paths map information
-
loadModule
private Module loadModule(java.lang.String name, ModuleLoader loader)
-
getModuleLoader
private ModuleLoader getModuleLoader()
-
-