Modifier and Type | Field and Description |
---|---|
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
static TypedPreference<IQuantity> |
CONTEXT_SWITCH_WARNING_LIMIT |
private static IAggregator<IQuantity,?> |
MAX_BLOCKS |
private static java.lang.String |
RESULT_ID |
Constructor and Description |
---|
ContextSwitchRule() |
Modifier and Type | Method and Description |
---|---|
private static long |
calculateSwitchRate(IItemCollection switchItems) |
java.util.concurrent.RunnableFuture<Result> |
evaluate(IItemCollection items,
IPreferenceValueProvider vp)
Gets a future representing the result of the evaluation of this rule.
|
private Result |
evaluate(IItemCollection items,
long switchRateLimit) |
java.util.Collection<TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
java.lang.String |
getId() |
private static long |
getMostBlocks(IItemCollection items) |
java.lang.String |
getName() |
java.lang.String |
getTopic() |
public static final TypedPreference<IQuantity> CONTEXT_SWITCH_WARNING_LIMIT
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
private static final java.lang.String RESULT_ID
private static final IAggregator<IQuantity,?> MAX_BLOCKS
public java.util.concurrent.RunnableFuture<Result> evaluate(IItemCollection items, IPreferenceValueProvider vp)
IRule
evaluate
in interface IRule
items
- items to evaluatevp
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.private Result evaluate(IItemCollection items, long switchRateLimit)
private static long calculateSwitchRate(IItemCollection switchItems)
private static long getMostBlocks(IItemCollection items)
public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.lang.String getId()
public java.lang.String getName()