com.go.trove.util.tq
Class TransactionQueueAdapter

java.lang.Object
  |
  +--com.go.trove.util.tq.TransactionQueueAdapter
All Implemented Interfaces:
java.util.EventListener, TransactionQueueListener, UncaughtExceptionListener
Direct Known Subclasses:
TransactionQueueSizeTuner, TransactionQueueThreadTuner

public abstract class TransactionQueueAdapter
extends java.lang.Object
implements TransactionQueueListener, UncaughtExceptionListener

Abstract implementation of TransactionQueueListener and UncaughtExceptionListener that make it easier to implement those listeners.

Version:
8 , 9/25/00
Author:
Brian S O'Neill

Constructor Summary
TransactionQueueAdapter()
           
 
Method Summary
 void transactionDequeued(TransactionQueueEvent e)
          Called when the transaction is dequeued and ready to be serviced.
 void transactionEnqueued(TransactionQueueEvent e)
          Called when the transaction is successfully enqueued.
 void transactionException(TransactionQueueEvent e)
          Called if an exception was thrown while trying to service the transaction.
 void transactionExpired(TransactionQueueEvent e)
          Called if a transaction couldn't be serviced because it expired.
 void transactionQueueFull(TransactionQueueEvent e)
          Called if the transaction couldn't be enqueued because the queue is full.
 void transactionServiced(TransactionQueueEvent e)
          Called after the transaction has been serviced, unless an exception was thrown while trying to service the transaction.
 void uncaughtException(UncaughtExceptionEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionQueueAdapter

public TransactionQueueAdapter()
Method Detail

transactionQueueFull

public void transactionQueueFull(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called if the transaction couldn't be enqueued because the queue is full. The transaction is not cancelled.

The stage duration value in the event is zero.

Specified by:
transactionQueueFull in interface TransactionQueueListener

transactionEnqueued

public void transactionEnqueued(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called when the transaction is successfully enqueued.

The stage duration value in the event is zero.

Specified by:
transactionEnqueued in interface TransactionQueueListener

transactionDequeued

public void transactionDequeued(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called when the transaction is dequeued and ready to be serviced.

The stage duration value in the event represents the amount of time the transaction was queued.

Specified by:
transactionDequeued in interface TransactionQueueListener

transactionServiced

public void transactionServiced(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called after the transaction has been serviced, unless an exception was thrown while trying to service the transaction.

The stage duration value in the event represents the amount of time the transaction took to service.

Specified by:
transactionServiced in interface TransactionQueueListener

transactionExpired

public void transactionExpired(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called if a transaction couldn't be serviced because it expired. The transaction is cancelled.

The stage duration value in the event represents the age of the expired transaction.

Specified by:
transactionExpired in interface TransactionQueueListener

transactionException

public void transactionException(TransactionQueueEvent e)
Description copied from interface: TransactionQueueListener
Called if an exception was thrown while trying to service the transaction. The transaction is cancelled.

The stage duration value in the event represents the amount of time that passed servicing the transaction before an exception was thrown and after the transaction is cancelled.

Specified by:
transactionException in interface TransactionQueueListener

uncaughtException

public void uncaughtException(UncaughtExceptionEvent event)
Specified by:
uncaughtException in interface UncaughtExceptionListener