com.neeve.aep.event
Class AepStuckAlertEvent

java.lang.Object
  extended by com.neeve.util.UtlListElement
      extended by com.neeve.event.Event
          extended by com.neeve.event.alert.AlertEvent
              extended by com.neeve.aep.event.AepStuckAlertEvent
All Implemented Interfaces:
com.neeve.event.alert.IAlertEvent, com.neeve.event.IEvent, com.neeve.util.UtlPool.Item<com.neeve.event.Event>, com.neeve.util.UtlReferenceTracker.HasReferenceTracker

public final class AepStuckAlertEvent
extends com.neeve.event.alert.AlertEvent

Event used to notify of a stuck engine

Threading:
This class is safe for concurrent access by multiple threads.

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 lastCompletionTimestamp, int incompletCommitCount)
          Create a new (initialized) stuck engine event.
static com.neeve.event.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
getEventTime
 
Methods inherited from class com.neeve.event.Event
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getPool, getRemainingTime, getScheduledTime, getSource, getType, init, isEndOfBatch, isHandled, owners, referenceTracker, setAcknowledger, setAttachment, setDelay, setDispatchTime, setEndOfBatch, setHandled, setPool, setScheduledTime
 
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, getRemainingTime, getScheduledTime, getSource, getType, isEndOfBatch, isHandled, owners, setAcknowledger, setAttachment, setDelay, setEndOfBatch, setHandled
 
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker
referenceTracker
 

Method Detail

create

public static com.neeve.event.Event create(Properties props)
Create a new (uninitialized) stuck engine event.


create

public static AepStuckAlertEvent create(AepStuckAlertEvent.Reason reason,
                                        long lastEventProcessingTimestamp,
                                        long lastCompletionTimestamp,
                                        int incompletCommitCount)
Create a new (initialized) stuck engine event.

Parameters:
lastEventProcessingTimestamp - The timestamp of the last completed event procesed by the engine.
lastCompletionTimestamp - The last commit completion.
incompletCommitCount - The number of incomplet transactions.

setMessage

public final void setMessage(String message)

getReason

public AepStuckAlertEvent.Reason getReason()
Returns the reason for this alert.

Returns:
The reason this alert was raised

message

public String message()
An optional descriptive message indicating the reason that the engine was determined to be stuck.

Returns:
A description of the problem, possibly null

getLastEventProcessedTimestamp

public long getLastEventProcessedTimestamp()
Gets the event processing completion timestamp of the last event processed by the engine.

Returns:
The last event processing completion timestamp.

getLastCommitCompletionTimestamp

public long getLastCommitCompletionTimestamp()
Gets the timestamp that the last commit was completed.

Returns:
the last commit completion timestamp

getIncompleteCommitCount

public int getIncompleteCommitCount()
Gets the number of commits that have not been completed.

Returns:
the number of commits that have not been completed.

toString

public final String toString()
Get a string representation of a stuck event.

Overrides:
toString in class com.neeve.event.alert.AlertEvent


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.