Package org.drools.core.time.impl
Class CompositeMaxDurationTimer
- java.lang.Object
-
- org.drools.core.rule.ConditionalElement
-
- org.drools.core.time.impl.BaseTimer
-
- org.drools.core.time.impl.CompositeMaxDurationTimer
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,RuleComponent,RuleConditionElement,Timer
public class CompositeMaxDurationTimer extends BaseTimer implements Timer
While a rule might have multiple DurationTimers, due to LHS CEP rules, there can only ever be one timer attribute. Duration rules should be considered a priority over the one timer rule. So the Timer cannot fire, until the maximum duration has passed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeMaxDurationTimer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDurationTimer(DurationTimer durationTimer)ConditionalElementclone()Returns a clone from itselfTriggercreateTrigger(long timestamp, String[] calendarNames, org.kie.api.runtime.Calendars calendars)TriggercreateTrigger(long timestamp, Tuple leftTuple, DefaultJobHandle jh, String[] calendarNames, org.kie.api.runtime.Calendars calendars, Declaration[][] declrs, ReteEvaluator reteEvaluator)TriggercreateTrigger(Activation item, InternalWorkingMemory wm)Declaration[][]getTimerDeclarations(Map<String,Declaration> outerDeclrs)voidreadExternal(ObjectInput in)voidsetTimer(Timer timer)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.drools.core.time.impl.BaseTimer
getInnerDeclarations, getNestedElements, getOuterDeclarations, isPatternScopeDelimiter, resolveDeclaration, sortDeclarations
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.rule.RuleConditionElement
getInnerDeclarations, getNestedElements, getOuterDeclarations, isPatternScopeDelimiter, resolveDeclaration
-
-
-
-
Method Detail
-
getTimerDeclarations
public Declaration[][] getTimerDeclarations(Map<String,Declaration> outerDeclrs)
- Specified by:
getTimerDeclarationsin classBaseTimer
-
addDurationTimer
public void addDurationTimer(DurationTimer durationTimer)
-
setTimer
public void setTimer(Timer timer)
-
createTrigger
public Trigger createTrigger(Activation item, InternalWorkingMemory wm)
-
createTrigger
public Trigger createTrigger(long timestamp, Tuple leftTuple, DefaultJobHandle jh, String[] calendarNames, org.kie.api.runtime.Calendars calendars, Declaration[][] declrs, ReteEvaluator reteEvaluator)
- Specified by:
createTriggerin interfaceTimer
-
createTrigger
public Trigger createTrigger(long timestamp, String[] calendarNames, org.kie.api.runtime.Calendars calendars)
- Specified by:
createTriggerin interfaceTimer
-
clone
public ConditionalElement clone()
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-