public final class AepStuckAlertEvent extends AlertEvent
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)| Modifier and Type | Class and Description |
|---|---|
static class |
AepStuckAlertEvent.Reason
Enumerates the reasons that cause an
AepStuckAlertEvent to
be emitted. |
count, head, next, prev| Modifier and Type | Method and Description |
|---|---|
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.
|
getBackingMessage, getEventTime, getTriggeringMessage, setBackingMessageacquire, 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, setSourcecount, insertAfter, insertBefore, isLinked, next, previous, unlink, wipeequals, getClass, hashCode, notify, notifyAll, wait, wait, waitacquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getRemainingTime, getScheduledTime, getSource, getType, isEndOfBatch, isHandled, owners, setAcknowledger, setAttachment, setDelay, setEndOfBatch, setHandled, setSourcereferenceTrackerpublic 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()
nullpublic long getLastEventProcessedTimestamp()
public long getLastCommitCompletionTimestamp()
public int getIncompleteCommitCount()
public final String toString()
toString in class AlertEventCopyright © 2019 Neeve Research, LLC. All Rights Reserved.