com.go.trove.util.tq
Class TransactionQueueThreadTuner

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

public class TransactionQueueThreadTuner
extends TransactionQueueAdapter

Automatically tunes a TransactionQueue by dynamically adjusting the maximum allowed number of worker threads. A TransactionQueueThreadTuner instance should only be added to one TransactionQueue.

NOTE: The current implementation of TransactionQueueThreadTuner is experimental and should not be used in production systems.

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

Constructor Summary
TransactionQueueThreadTuner()
           
 
Method Summary
 void transactionDequeued(TransactionQueueEvent e)
          Called when the transaction is dequeued and ready to be serviced.
 void transactionServiced(TransactionQueueEvent e)
          Called after the transaction has been serviced, unless an exception was thrown while trying to service the transaction.
 
Methods inherited from class com.go.trove.util.tq.TransactionQueueAdapter
transactionEnqueued, transactionException, transactionExpired, transactionQueueFull, uncaughtException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionQueueThreadTuner

public TransactionQueueThreadTuner()
Method Detail

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.

Overrides:
transactionDequeued in class TransactionQueueAdapter

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.

Overrides:
transactionServiced in class TransactionQueueAdapter