com.go.trove.util.tq
Class TransactionQueueSizeTuner

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

public class TransactionQueueSizeTuner
extends TransactionQueueAdapter

Automatically tunes a TransactionQueue by dynamically adjusting the maximum size of the queue. TransactionQueueSizeTuner only works for TransactionQueues that have a transaction timeout, and a TransactionQueueSizeTuner instance should only be added to one TransactionQueue.

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

Constructor Summary
TransactionQueueSizeTuner()
           
 
Method Summary
 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.
 
Methods inherited from class com.go.trove.util.tq.TransactionQueueAdapter
transactionDequeued, transactionEnqueued, transactionException, transactionServiced, uncaughtException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionQueueSizeTuner

public TransactionQueueSizeTuner()
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.

Overrides:
transactionQueueFull in class TransactionQueueAdapter

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.

Overrides:
transactionExpired in class TransactionQueueAdapter