Package net.sf.eBus.client
Class EClient.RQStats
- java.lang.Object
-
- net.sf.eBus.client.EClient.RQStats
-
- Enclosing class:
- EClient
public static final class EClient.RQStats extends java.lang.Object
Contains theEClient.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()
ReturnsRQThreadUpdate
message associated with thisRQThread
stat.boolean
isOverrun()
Returns current maximum quantum overrun status wheretrue
means the run queue thread is currently exceeding overrun state.boolean
isOverrun(long now, long overrunLimit)
Returnstrue
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 theRQThreadUpdate
message posted for this currentRQThread
stat.EClient.ObjectState
state()
Returns eBus object state: either on running anRQThread
or off thread.long
timestamp()
Returns time eBus object started or stopped running on thread.java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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 benull
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 anRQThread
or off thread.- Returns:
- eBus object thread state.
-
isOverrun
public boolean isOverrun()
Returns current maximum quantum overrun status wheretrue
means the run queue thread is currently exceeding overrun state.- Returns:
- overrun status.
-
isOverrun
public boolean isOverrun(long now, long overrunLimit)
Returnstrue
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.
- 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.
-
object state is
-
getUpdate
@Nullable public ENotificationMessage getUpdate()
ReturnsRQThreadUpdate
message associated with thisRQThread
stat. May returnnull
.- Returns:
- eBus notification message.
-
setUpdate
public void setUpdate(ENotificationMessage update)
Stores theRQThreadUpdate
message posted for this currentRQThread
stat.- Parameters:
update
- eBus notification message.
-
-