Class DefaultEventHandle

    • Constructor Detail

      • DefaultEventHandle

        public DefaultEventHandle()
      • DefaultEventHandle

        public DefaultEventHandle​(long id,
                                  org.drools.base.rule.EntryPointId entryPointId)
      • DefaultEventHandle

        public DefaultEventHandle​(long id,
                                  java.lang.Object object,
                                  long recency,
                                  long timestamp,
                                  long duration,
                                  WorkingMemoryEntryPoint wmEntryPoint)
        Creates a new event fact handle.
        Parameters:
        id - this event fact handle ID
        object - the event object encapsulated in this event fact handle
        recency - the recency of this event fact handle
        timestamp - the timestamp of the occurrence of this event
        duration - the duration of this event. May be 0 (zero) in case this is a primitive event.
      • DefaultEventHandle

        protected DefaultEventHandle​(long id,
                                     int identityHashCode,
                                     java.lang.Object object,
                                     long recency,
                                     long timestamp,
                                     long duration,
                                     org.drools.base.rule.EntryPointId entryPointId)
    • Method Detail

      • isEvent

        public boolean isEvent()
        Always returns true, since the EventFactHandle is only used for Events, and not for regular Facts
        Specified by:
        isEvent in interface org.kie.api.runtime.rule.FactHandle
        Specified by:
        isEvent in interface InternalFactHandle
        Overrides:
        isEvent in class DefaultFactHandle
      • getStartTimestamp

        public long getStartTimestamp()
        Returns the timestamp of the occurrence of this event.
        Specified by:
        getStartTimestamp in interface org.kie.api.runtime.rule.EventHandle
        Returns:
      • getDuration

        public long getDuration()
        Returns the duration of this event. In case this is a primitive event, returns 0 (zero).
        Specified by:
        getDuration in interface org.kie.api.runtime.rule.EventHandle
        Returns:
      • getEndTimestamp

        public long getEndTimestamp()
        Returns the end timestamp for this event. This is the same as: startTimestamp + duration
        Specified by:
        getEndTimestamp in interface org.kie.api.runtime.rule.EventHandle
        Returns:
      • setExpired

        public void setExpired​(boolean expired)
      • setPendingRemoveFromStore

        public void setPendingRemoveFromStore​(boolean pendingRemove)
      • increaseOtnCount

        public void increaseOtnCount()
      • decreaseOtnCount

        public void decreaseOtnCount()
      • getOtnCount

        public int getOtnCount()
      • setOtnCount

        public void setOtnCount​(int otnCount)
      • unscheduleAllJobs

        public void unscheduleAllJobs​(ReteEvaluator reteEvaluator)