Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
BUFFER_LOST_RESULT_ID |
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
static TypedResult<IQuantity> |
DROPPED_COUNT |
static TypedResult<IQuantity> |
DROPPED_SIZE |
static TypedResult<IQuantity> |
FIRST_DROPPED_BUFFER_TIME |
private static java.util.List<TypedResult<?>> |
RESULT_ATTRIBUTES |
static TypedPreference<IQuantity> |
WARNING_LIMIT |
Constructor and Description |
---|
BufferLostRule() |
Modifier and Type | Method and Description |
---|---|
private double |
calculateScore(IQuantity limit,
IQuantity droppedCount) |
java.util.concurrent.RunnableFuture<IResult> |
createEvaluation(IItemCollection items,
IPreferenceValueProvider preferenceValueProvider,
IResultValueProvider dependencyResults)
Gets a future representing the result of the evaluation of this rule.
|
java.util.Collection<TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
java.lang.String |
getId() |
java.lang.String |
getName() |
java.util.Map<java.lang.String,RulesToolkit.EventAvailability> |
getRequiredEvents() |
private IResult |
getResult(IItemCollection items,
IPreferenceValueProvider valueProvider,
IResultValueProvider resultValueProvider) |
java.util.Collection<TypedResult<?>> |
getResults()
Gets information about which results may be part of an
IResult instance. |
java.lang.String |
getTopic() |
private static final java.lang.String BUFFER_LOST_RESULT_ID
public static final TypedPreference<IQuantity> WARNING_LIMIT
public static final TypedResult<IQuantity> DROPPED_COUNT
public static final TypedResult<IQuantity> DROPPED_SIZE
public static final TypedResult<IQuantity> FIRST_DROPPED_BUFFER_TIME
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
private static final java.util.List<TypedResult<?>> RESULT_ATTRIBUTES
public java.lang.String getId()
public java.lang.String getTopic()
public java.lang.String getName()
public java.util.Map<java.lang.String,RulesToolkit.EventAvailability> getRequiredEvents()
getRequiredEvents
in interface IRule
RulesToolkit.EventAvailability
this rule
requires for that event typeprivate IResult getResult(IItemCollection items, IPreferenceValueProvider valueProvider, IResultValueProvider resultValueProvider)
public java.util.concurrent.RunnableFuture<IResult> createEvaluation(IItemCollection items, IPreferenceValueProvider preferenceValueProvider, IResultValueProvider dependencyResults)
IRule
createEvaluation
in interface IRule
items
- items to evaluatepreferenceValueProvider
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.dependencyResults
- 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.public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.util.Collection<TypedResult<?>> getResults()
IRule
IResult
instance.getResults
in interface IRule