Class EClient.RQStats

  • Enclosing class:
    EClient

    public static final class EClient.RQStats
    extends java.lang.Object
    Contains the EClient.RQThread current condition. This includes: thread name, maximum run quantum allowed, current run index, eBus object being run, and eBus object run start time in nanoseconds. This information is used to determine if an eBus object is exceeding the maximum allowed run time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EObject eBusObject()
      Returns eBus object currently being run by thread.
      ENotificationMessage getUpdate()
      Returns RQThreadUpdate message associated with this RQThread stat.
      boolean isOverrun()
      Returns current maximum quantum overrun status where true means the run queue thread is currently exceeding overrun state.
      boolean isOverrun​(long now, long overrunLimit)
      Returns true if this thread contains an eBus object which is overrunning the maximum run quantum at this very moment.
      long maximumQuantum()
      Returns maximum run quantum.
      java.lang.String name()
      Returns run queue thread name.
      long runCount()
      Returns number of eBus objects "run" by the given run queue thread.
      void setUpdate​(ENotificationMessage update)
      Stores the RQThreadUpdate message posted for this current RQThread stat.
      EClient.ObjectState state()
      Returns eBus object state: either on running an RQThread or off thread.
      long timestamp()
      Returns time eBus object started or stopped running on thread.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • name

        public java.lang.String name()
        Returns run queue thread name.
        Returns:
        run queue thread name.
      • maximumQuantum

        public long maximumQuantum()
        Returns maximum run quantum.
        Returns:
        maximum run quantum.
      • runCount

        public long runCount()
        Returns number of eBus objects "run" by the given run queue thread.
        Returns:
        eBus object run count.
      • eBusObject

        public EObject eBusObject()
        Returns eBus object currently being run by thread. Will be null if thread is not running an object.
        Returns:
        eBus object.
      • timestamp

        public long timestamp()
        Returns time eBus object started or stopped running on thread.
        Returns:
        eBus object run start time.
      • state

        public EClient.ObjectState state()
        Returns eBus object state: either on running an RQThread or off thread.
        Returns:
        eBus object thread state.
      • isOverrun

        public boolean isOverrun()
        Returns current maximum quantum overrun status where true means the run queue thread is currently exceeding overrun state.
        Returns:
        overrun status.
      • isOverrun

        public boolean isOverrun​(long now,
                                 long overrunLimit)
        Returns true if this thread contains an eBus object which is overrunning the maximum run quantum at this very moment. A thread is overrunning if
        • object state is EClient.ObjectState.ON_RQ_THREAD and
        • the difference between now and the object on-thread start time is ≥ maximum time quantum plus the given overrun limit.
        The reason for an overrun limit is to prevent repeated alarms raised for minor quantum infractions.
        Parameters:
        now - current nanosecond timestamp.
        overrunLimit - object must overrun maximum time quantum by this nanosecond amount before declaring an overrun.
        Returns:
        true if a maximum run quantum overrun is in progress.
      • getUpdate

        @Nullable
        public ENotificationMessage getUpdate()
        Returns RQThreadUpdate message associated with this RQThread stat. May return null.
        Returns:
        eBus notification message.
      • setUpdate

        public void setUpdate​(ENotificationMessage update)
        Stores the RQThreadUpdate message posted for this current RQThread stat.
        Parameters:
        update - eBus notification message.