Modifier and Type | Field and Description |
---|---|
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
static TypedResult<java.lang.String> |
LONGEST_OPERATION |
static TypedResult<IMCThread> |
LONGEST_OPERATION_CALLER |
static TypedResult<IQuantity> |
LONGEST_OPERATION_DURATION |
static TypedResult<IQuantity> |
LONGEST_OPERATION_START_TIME |
private static double |
MAX_SECONDS_BETWEEN_EVENTS |
private static java.util.Map<java.lang.String,RulesToolkit.EventAvailability> |
REQUIRED_EVENTS |
private static java.util.Collection<TypedResult<?>> |
RESULT_ATTRIBUTES |
private static java.lang.String |
RESULT_ID |
static TypedPreference<IQuantity> |
WARNING_LIMIT |
Constructor and Description |
---|
VMOperationRule() |
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.RunnableFuture<IResult> |
createEvaluation(IItemCollection items,
IPreferenceValueProvider vp,
IResultValueProvider rp)
Gets a future representing the result of the evaluation of this rule.
|
private IResult |
evaluate(IItemCollection items,
IPreferenceValueProvider vp,
IResultValueProvider rp) |
private Pair<IItem,IQuantity> |
findLongestEventInfo(IItemCollection items) |
private IMCThread |
getCaller(IItem event) |
java.util.Collection<TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
private IQuantity |
getDuration(IItem event) |
private IQuantity |
getEndTime(IItem event) |
java.lang.String |
getId() |
java.lang.String |
getName() |
private java.lang.String |
getOperation(IItem event) |
java.util.Map<java.lang.String,RulesToolkit.EventAvailability> |
getRequiredEvents() |
java.util.Collection<TypedResult<?>> |
getResults()
Gets information about which results may be part of an
IResult instance. |
private IQuantity |
getStartTime(IItem event) |
java.lang.String |
getTopic() |
private java.util.List<IItem> |
sortEventsByStartTime(IItemCollection items) |
private static final java.lang.String RESULT_ID
private static final double MAX_SECONDS_BETWEEN_EVENTS
public static final TypedPreference<IQuantity> WARNING_LIMIT
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
private static final java.util.Map<java.lang.String,RulesToolkit.EventAvailability> REQUIRED_EVENTS
public static final TypedResult<IQuantity> LONGEST_OPERATION_DURATION
public static final TypedResult<java.lang.String> LONGEST_OPERATION
public static final TypedResult<IMCThread> LONGEST_OPERATION_CALLER
public static final TypedResult<IQuantity> LONGEST_OPERATION_START_TIME
private static final java.util.Collection<TypedResult<?>> RESULT_ATTRIBUTES
public java.util.concurrent.RunnableFuture<IResult> createEvaluation(IItemCollection items, IPreferenceValueProvider vp, IResultValueProvider rp)
IRule
createEvaluation
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()
.rp
- Provider of results from rules evaluated prior to this rule and which this rule
explicitly depends on via a DependsOn
annotation. The attributes that will
be asked for from the provider will be provided by each dependant rule, e.g. via
public static constants.private IResult evaluate(IItemCollection items, IPreferenceValueProvider vp, IResultValueProvider rp)
private Pair<IItem,IQuantity> findLongestEventInfo(IItemCollection items)
private java.util.List<IItem> sortEventsByStartTime(IItemCollection items)
private java.lang.String getOperation(IItem event)
public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.lang.String getId()
public java.lang.String getName()
public java.lang.String getTopic()
public java.util.Map<java.lang.String,RulesToolkit.EventAvailability> getRequiredEvents()
getRequiredEvents
in interface IRule
RulesToolkit.EventAvailability
this rule
requires for that event typepublic java.util.Collection<TypedResult<?>> getResults()
IRule
IResult
instance.getResults
in interface IRule