|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.event.Event
com.neeve.event.alert.AlertEvent
com.neeve.aep.event.AepStuckAlertEvent
public final class AepStuckAlertEvent
Event used to notify of a stuck engine.
AepStuckAlertEvent
are emitted when an AepEngine
is configured
with an stuckAlertEventThread which is set via the engine descriptor AepEngineDescriptor#setStuckAlertEventThreshold(int)
Note that unlike other alert event emitted by an AepEngine
, engine
stuck alerts are emitted by a separate thread that periodically checks engine
health. To listen for AepStuckAlertEvent
one must set an
IAepAsynchronousEventHandler
on the AepEngine via
AepEngine.setAsynchronousEventHandler(handler)
.
Because AepStuckAlertEvent
are not emitted on the AepEngine
's event multiplexer
thread, it is not generally safe to access engine methods that are not thread safe when processing
this event.
AepEngine.setAsynchronousEventHandler(com.neeve.aep.IAepAsynchronousEventHandler)
,
AepEngineDescriptor.setStuckAlertEventThreshold(int)
Nested Class Summary | |
---|---|
static class |
AepStuckAlertEvent.Reason
Enumerates the reasons that cause an AepStuckAlertEvent to
be emitted. |
Field Summary |
---|
Fields inherited from class com.neeve.util.UtlListElement |
---|
count, head, next, prev |
Method Summary | |
---|---|
static AepStuckAlertEvent |
create(AepStuckAlertEvent.Reason reason,
long lastEventProcessingTimestamp,
long lastCommitCompletionTimestamp,
int incompleteCommitCount)
Create a new (initialized) stuck engine event. |
static Event |
create(Properties props)
Create a new (uninitialized) stuck engine event. |
int |
getIncompleteCommitCount()
Gets the number of commits that have not been completed. |
long |
getLastCommitCompletionTimestamp()
Gets the timestamp that the last commit was completed. |
long |
getLastEventProcessedTimestamp()
Gets the event processing completion timestamp of the last event processed by the engine. |
AepStuckAlertEvent.Reason |
getReason()
Returns the reason for this alert. |
String |
message()
An optional descriptive message indicating the reason that the engine was determined to be stuck. |
void |
setMessage(String message)
|
String |
toString()
Get a string representation of a stuck event. |
Methods inherited from class com.neeve.event.alert.AlertEvent |
---|
getBackingMessage, getEventTime, getTriggeringMessage, setBackingMessage |
Methods inherited from class com.neeve.event.Event |
---|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getOfferTs, getPollTs, getPool, getRemainingTime, getScheduledTime, getSource, getType, init, isEndOfBatch, isHandled, owners, referenceTracker, setAcknowledger, setAttachment, setDelay, setDispatchTime, setEndOfBatch, setHandled, setPool, setScheduledTime, setSource |
Methods inherited from class com.neeve.util.UtlListElement |
---|
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.neeve.event.IEvent |
---|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getRemainingTime, getScheduledTime, getSource, getType, isEndOfBatch, isHandled, owners, setAcknowledger, setAttachment, setDelay, setEndOfBatch, setHandled, setSource |
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker |
---|
referenceTracker |
Method Detail |
---|
public static Event create(Properties props)
public static AepStuckAlertEvent create(AepStuckAlertEvent.Reason reason, long lastEventProcessingTimestamp, long lastCommitCompletionTimestamp, int incompleteCommitCount)
lastEventProcessingTimestamp
- The timestamp of the last completed event procesed by the engine.lastCommitCompletionTimestamp
- The last commit completion.incompleteCommitCount
- The number of incomplete transactions.public final void setMessage(String message)
public AepStuckAlertEvent.Reason getReason()
public String message()
null
public long getLastEventProcessedTimestamp()
public long getLastCommitCompletionTimestamp()
public int getIncompleteCommitCount()
public final String toString()
toString
in class AlertEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |