com.neeve.aep
Class AepSendCommitCompletionEvent

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

public final class AepSendCommitCompletionEvent
extends Event

Event notifying the AEP engine when a send commit completed.

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

This event is used for private communication between the AEP engine and AEP bus managers to notify of the delivery stability of all messages in an outbound send commit. An AEP user does not have any direct use of this event.


Field Summary
 
Fields inherited from class com.neeve.util.UtlListElement
count, head, next, prev
 
Method Summary
static AepSendCommitCompletionEvent create(MessageBusBinding binding, boolean includeStabilityEvents, boolean captureTimings)
          Create a new (initialized) commit completion event.
static Event create(Properties props)
          Create a new (uninitialized) commit completion event.
 long getMeanOutTs()
          Get the mean outbound timestamp
 UtlList getStabilityEvents()
          Get the list of messages stabilized by the commit signified by this event.
 int getStabilizedMessageCount()
          Get the number of messages whose stability is being notified by this evemt.
 Exception getStatus()
          Get the send completion status.
 boolean includesStabilityEvents()
          Return if the commit will enque the stabilized messages in the event.
 void onMessageSend(IRogMessage message)
          Notify of a message send.
 void onMessageStability(MessageStabilityEvent event)
          Notify of a message stabilization.
 
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, toString
 
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
 

Method Detail

create

public static Event create(Properties props)
Create a new (uninitialized) commit completion event.

This method instantiates a new commit completion event object. The method is for use by the event factory to instantiate new commit completion events.The method should not be used directly by the user since the method bypasses any event pooling i.e. it creates a new commit completion event object even if there are eligible event objects available in the event type's pool.


create

public static AepSendCommitCompletionEvent create(MessageBusBinding binding,
                                                  boolean includeStabilityEvents,
                                                  boolean captureTimings)
Create a new (initialized) commit completion event.

Parameters:
binding - The bus binding associated with the send commit that this event will notify completion of.
includeStabilityEvents - This parameter specifies whether the event should be populated with the list of stability events representing the set of stabilized messages. If the value in this parameter is false, then the list returned by getStabilityEvents() will be empty.

This method instantiates and initializes a commit completion event. The method uses the event factory to instantiate a commit completion event (the factory recycles objects through the event type's object pool is configured for the type) and then initializes it with the supplied parameters.


onMessageSend

public final void onMessageSend(IRogMessage message)
Notify of a message send.

Parameters:
message - The stabilized message.

This method is intended for use by the AEP bus manager to notify the event object that a message has been sent. The event object uses this notification to store outbound message timestamps that can be used by the AEP engine for latency calculations.


getMeanOutTs

public final long getMeanOutTs()
Get the mean outbound timestamp


onMessageStability

public final void onMessageStability(MessageStabilityEvent event)
Notify of a message stabilization.

Parameters:
event - The stability event.

This method is intended for use by the AEP bus manager to notify the event object of a message stabilization. The event object uses this notification to store the stability event (in case it is configured to do so) for delivery back to the AEP engine


getStatus

public final Exception getStatus()
Get the send completion status.

Returns:
Returns the send completion status. A null value indicates all messages were sent successfully. A non-null value indicates that there was at least one failure and the returned value is the failure status for the first failed send.

getStabilizedMessageCount

public final int getStabilizedMessageCount()
Get the number of messages whose stability is being notified by this evemt.

This method always returns the stabilized message count irrespoective of whether the event is configured to include stabilized messages or not.


includesStabilityEvents

public final boolean includesStabilityEvents()
Return if the commit will enque the stabilized messages in the event.

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

getStabilityEvents

public final UtlList getStabilityEvents()
Get the list of messages stabilized by the commit signified by this event.



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