Class ClassLeakingRule
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.jdk.general.ClassLeakingRule
-
- All Implemented Interfaces:
IRule
public final class ClassLeakingRule extends java.lang.Object implements IRule
This rule looks at the loaded classes to try to figure out if multiple classes with the same name has been loaded. Note that this rule can get fairly expensive if you have load events with many (thousands) of unique classes.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<TypedPreference<?>>
CONFIG_ATTRIBUTES
private static java.lang.String
COUNT_AGGREGATOR_ID
static TypedPreference<IQuantity>
MAX_NUMBER_OF_CLASSES_TO_REPORT
private static java.lang.String
RESULT_ID
static TypedPreference<IQuantity>
WARNING_LIMIT
-
Constructor Summary
Constructors Constructor Description ClassLeakingRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static IItemFilter
createClassAttributeFilter(IAttribute<IMCType> attribute, java.util.Map<java.lang.String,ClassEntry> entries)
private java.util.Map<java.lang.String,ClassEntry>
diff(java.util.Map<java.lang.String,ClassEntry> entriesLoad, java.util.Map<java.lang.String,ClassEntry> entriesUnload)
java.util.concurrent.RunnableFuture<Result>
evaluate(IItemCollection items, IPreferenceValueProvider valueProvider)
Gets a future representing the result of the evaluation of this rule.private java.util.Map<java.lang.String,ClassEntry>
extractClassEntriesFromQuery(IItemCollection items, IItemQuery query)
java.util.Collection<TypedPreference<?>>
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.java.lang.String
getId()
java.lang.String
getName()
private Result
getResult(IItemCollection items, IPreferenceValueProvider valueProvider)
java.lang.String
getTopic()
-
-
-
Field Detail
-
RESULT_ID
private static final java.lang.String RESULT_ID
- See Also:
- Constant Field Values
-
COUNT_AGGREGATOR_ID
private static final java.lang.String COUNT_AGGREGATOR_ID
- See Also:
- Constant Field Values
-
WARNING_LIMIT
public static final TypedPreference<IQuantity> WARNING_LIMIT
-
MAX_NUMBER_OF_CLASSES_TO_REPORT
public static final TypedPreference<IQuantity> MAX_NUMBER_OF_CLASSES_TO_REPORT
-
CONFIG_ATTRIBUTES
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
-
-
Method Detail
-
getResult
private Result getResult(IItemCollection items, IPreferenceValueProvider valueProvider)
-
createClassAttributeFilter
private static IItemFilter createClassAttributeFilter(IAttribute<IMCType> attribute, java.util.Map<java.lang.String,ClassEntry> entries)
-
diff
private java.util.Map<java.lang.String,ClassEntry> diff(java.util.Map<java.lang.String,ClassEntry> entriesLoad, java.util.Map<java.lang.String,ClassEntry> entriesUnload)
-
extractClassEntriesFromQuery
private java.util.Map<java.lang.String,ClassEntry> extractClassEntriesFromQuery(IItemCollection items, IItemQuery query)
-
evaluate
public java.util.concurrent.RunnableFuture<Result> evaluate(IItemCollection items, IPreferenceValueProvider valueProvider)
Description copied from interface:IRule
Gets a future representing the result of the evaluation of this rule. Running the RunnableFuture is the responsibility of the caller of this method, not the implementation.- Specified by:
evaluate
in interfaceIRule
- Parameters:
items
- items to evaluatevalueProvider
- Provider of configuration values used for evaluation. The attributes that will be asked for from the provider should be provided byIRule.getConfigurationAttributes()
.- Returns:
- a RunnableFuture that when run will return the evaluation result
-
getConfigurationAttributes
public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
Description copied from interface:IRule
Gets information about which attributes may be configured during rule evaluation.- Specified by:
getConfigurationAttributes
in interfaceIRule
- Returns:
- a list of configuration attributes
-
getId
public java.lang.String getId()
-
getName
public java.lang.String getName()
-
-