Package org.drools.core.common
Class DefaultEventHandle
java.lang.Object
org.drools.core.util.AbstractLinkedListNode<DefaultFactHandle>
org.drools.core.common.DefaultFactHandle
org.drools.core.common.DefaultEventHandle
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<DefaultEventHandle>,InternalFactHandle,DoubleLinkedEntry<DefaultFactHandle>,SingleLinkedEntry<DefaultFactHandle>,EventHandle,FactHandle
public class DefaultEventHandle
extends DefaultFactHandle
implements EventHandle, Comparable<DefaultEventHandle>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.drools.core.common.DefaultFactHandle
DefaultFactHandle.CompositeLinkedTuples, DefaultFactHandle.DummyLinkedTuples, DefaultFactHandle.SingleLinkedTuplesNested classes/interfaces inherited from interface org.kie.api.runtime.rule.FactHandle
FactHandle.StateNested classes/interfaces inherited from interface org.drools.core.common.InternalFactHandle
InternalFactHandle.DummyFactHandle, InternalFactHandle.LinkedTuples -
Field Summary
Fields inherited from class org.drools.core.common.DefaultFactHandle
entryPointId, id, identityHashCode, linkedTuples, object, objectClassName, objectHashCode, recency, wmEntryPoint -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultEventHandle(long id, int identityHashCode, Object object, long recency, long timestamp, long duration, EntryPointId entryPointId) DefaultEventHandle(long id, Object object, long recency, long timestamp, long duration, WorkingMemoryEntryPoint wmEntryPoint) Creates a new event fact handle.DefaultEventHandle(long id, EntryPointId entryPointId) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJob(DefaultJobHandle job) clone()intvoidlongReturns the duration of this event.longReturns the end timestamp for this event.protected StringintlongReturns the timestamp of the occurrence of this event.voidvoidbooleanisEvent()Always returns true, since the EventFactHandle is only used for Events, and not for regular FactsbooleanbooleanbooleanisValid()voidvoidvoidsetExpired(boolean expired) voidsetOtnCount(int otnCount) voidsetPendingRemoveFromStore(boolean pendingRemove) toString()voidunscheduleAllJobs(ReteEvaluator reteEvaluator) Methods inherited from class org.drools.core.common.DefaultFactHandle
addFirstLeftTuple, addLastLeftTuple, addLastRightTuple, as, clearLeftTuples, clearRightTuples, createFromExternalFormat, detachLinkedTuples, detachLinkedTuplesForPartition, determineIdentityHashCode, disconnect, equals, findFirstLeftTuple, forEachLeftTuple, forEachRightTuple, getEntryPoint, getEntryPointId, getEqualityKey, getExternalForm, getFirstLeftTuple, getFirstRightTuple, getId, getIdentityHashCode, getLinkedTuples, getObject, getObjectClassName, getObjectHashCode, getRecency, getReteEvaluator, getTraitType, hashCode, isDisconnected, isNegated, isTraitable, isTraiting, isTraitOrTraitable, removeLeftTuple, removeRightTuple, setDisconnected, setEqualityKey, setExternalForm, setIdentityHashCode, setLinkedTuples, setNegated, setObject, setObjectHashCode, setRecency, setTraitType, toExternalFormMethods inherited from class org.drools.core.util.AbstractLinkedListNode
clear, getNext, getPrevious, setNext, setPreviousMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kie.api.runtime.rule.FactHandle
asMethods inherited from interface org.drools.core.common.InternalFactHandle
getEntryPointName, hasMatches
-
Constructor Details
-
DefaultEventHandle
public DefaultEventHandle() -
DefaultEventHandle
-
DefaultEventHandle
public DefaultEventHandle(long id, Object object, long recency, long timestamp, long duration, WorkingMemoryEntryPoint wmEntryPoint) Creates a new event fact handle.- Parameters:
id- this event fact handle IDobject- the event object encapsulated in this event fact handlerecency- the recency of this event fact handletimestamp- the timestamp of the occurrence of this eventduration- the duration of this event. May be 0 (zero) in case this is a primitive event.
-
DefaultEventHandle
protected DefaultEventHandle(long id, int identityHashCode, Object object, long recency, long timestamp, long duration, EntryPointId entryPointId)
-
-
Method Details
-
getFormatVersion
- Overrides:
getFormatVersionin classDefaultFactHandle
-
toString
- Overrides:
toStringin classDefaultFactHandle- See Also:
-
isEvent
public boolean isEvent()Always returns true, since the EventFactHandle is only used for Events, and not for regular Facts- Specified by:
isEventin interfaceFactHandle- Specified by:
isEventin interfaceInternalFactHandle- Overrides:
isEventin classDefaultFactHandle
-
getStartTimestamp
public long getStartTimestamp()Returns the timestamp of the occurrence of this event.- Specified by:
getStartTimestampin interfaceEventHandle- Returns:
-
getDuration
public long getDuration()Returns the duration of this event. In case this is a primitive event, returns 0 (zero).- Specified by:
getDurationin interfaceEventHandle- Returns:
-
getEndTimestamp
public long getEndTimestamp()Returns the end timestamp for this event. This is the same as: startTimestamp + duration- Specified by:
getEndTimestampin interfaceEventHandle- Returns:
-
getLinkedFactHandle
-
invalidate
public void invalidate()- Specified by:
invalidatein interfaceInternalFactHandle- Overrides:
invalidatein classDefaultFactHandle
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceFactHandle- Specified by:
isValidin interfaceInternalFactHandle- Overrides:
isValidin classDefaultFactHandle
-
isExpired
public boolean isExpired()- Specified by:
isExpiredin interfaceEventHandle- Specified by:
isExpiredin interfaceInternalFactHandle- Overrides:
isExpiredin classDefaultFactHandle
-
setExpired
public void setExpired(boolean expired) -
isPendingRemoveFromStore
public boolean isPendingRemoveFromStore()- Specified by:
isPendingRemoveFromStorein interfaceInternalFactHandle- Overrides:
isPendingRemoveFromStorein classDefaultFactHandle
-
setPendingRemoveFromStore
public void setPendingRemoveFromStore(boolean pendingRemove) -
increaseOtnCount
public void increaseOtnCount() -
decreaseOtnCount
public void decreaseOtnCount() -
getOtnCount
public int getOtnCount() -
setOtnCount
public void setOtnCount(int otnCount) -
clone
- Specified by:
clonein interfaceInternalFactHandle- Overrides:
clonein classDefaultFactHandle
-
cloneAndLink
-
quickCloneUpdate
-
compareTo
- Specified by:
compareToin interfaceComparable<DefaultEventHandle>
-
addJob
-
removeJob
-
unscheduleAllJobs
-