com.go.trove.util.tq
Class TransactionQueueData

java.lang.Object
  |
  +--com.go.trove.util.tq.TransactionQueueData
All Implemented Interfaces:
java.io.Serializable

public class TransactionQueueData
extends java.lang.Object
implements java.io.Serializable

This class contains a snapshot of data from a TransactionQueue.

Version:
17 , 01/03/13
Author:
Brian S O'Neill
See Also:
Serialized Form

Method Summary
 TransactionQueueData add(TransactionQueueData data)
          Adds TransactionQueueData to another.
 double getAverageQueueDuration()
          Returns the average amount of time, in milliseconds, that a transaction was in the queue.
 double getAverageServiceDuration()
          Returns the average amount of time, in milliseconds, it took servicing a transaction.
 double getEnqueueAttemptRate()
          Returns the amount of enqueue attempts per second over the snapshot interval.
 double getEnqueueFailureRatio()
          Returns zero if no enqueues failed, one if all enqueues failed, or a number in between if some failed.
 double getEnqueueSuccessRate()
          Returns the amount of successful transaction enqueues per second over the snapshot interval.
 int getPeakQueueSize()
          Returns the biggest queue size over the snapshot interval.
 int getPeakServicingCount()
          Returns the highest servicing count over the snapshot interval.
 int getPeakThreadCount()
          Returns the highest thread count over the snapshot interval.
 int getQueueSize()
          Returns the number of queued transactions at the snapshot end.
 double getServiceRate()
          Returns the amount of transactions serviced per second over the snapshot interval.
 int getServicingCount()
          Returns the amount of transactions currently being serviced at the snapshot end.
 long getSnapshotDuration()
          Returns the length of the snapshot interval in milliseconds.
 java.util.Date getSnapshotEnd()
          Returns the date/time for when the snapshot ended.
 java.util.Date getSnapshotStart()
          Returns the date/time for when the snapshot started.
 int getThreadCount()
          Returns the amount of worker threads in this TransactionQueue at the snapshot end.
 int getTotalEnqueueAttempts()
          Returns the total amount of transactions that were attempted to be enqueued over the snapshot interval.
 int getTotalEnqueued()
          Returns the total amount of transactions that were enqueued over the snapshot interval.
 int getTotalEnqueueFailures()
          Returns the total amount of enqueue attempts that failed because the queue was full.
 int getTotalExpired()
          Returns the total amount of expired transactions over the snapshot interval.
 long getTotalQueueDuration()
          Returns the total time, in milliseconds, that transactions were waiting in the queue.
 int getTotalServiced()
          Returns the total amount of transactions serviced over the snapshot interval.
 long getTotalServiceDuration()
          Returns the total time, in milliseconds, that transactions were being serviced.
 int getTotalServiceExceptions()
          Returns the number of transactions that were canceled because of an uncaught exception while being serviced.
 int getTotalUncaughtExceptions()
          Returns the total number of uncaught exceptions in the TransactionQueue.
 int getTotalUnserviced()
          Returns the total amount of transactions that weren't serviced because the queue was full, the transaction expired, or an exception was thrown.
 TransactionQueue getTransactionQueue()
          Returns the TransactionQueue source of this data, or null if not applicable or missing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public TransactionQueueData add(TransactionQueueData data)
Adds TransactionQueueData to another.

getTransactionQueue

public TransactionQueue getTransactionQueue()
Returns the TransactionQueue source of this data, or null if not applicable or missing.

getSnapshotStart

public java.util.Date getSnapshotStart()
Returns the date/time for when the snapshot started.

getSnapshotEnd

public java.util.Date getSnapshotEnd()
Returns the date/time for when the snapshot ended.

getQueueSize

public int getQueueSize()
Returns the number of queued transactions at the snapshot end.

getThreadCount

public int getThreadCount()
Returns the amount of worker threads in this TransactionQueue at the snapshot end.

getServicingCount

public int getServicingCount()
Returns the amount of transactions currently being serviced at the snapshot end.

getPeakQueueSize

public int getPeakQueueSize()
Returns the biggest queue size over the snapshot interval.

getPeakThreadCount

public int getPeakThreadCount()
Returns the highest thread count over the snapshot interval.

getPeakServicingCount

public int getPeakServicingCount()
Returns the highest servicing count over the snapshot interval.

getTotalEnqueueAttempts

public int getTotalEnqueueAttempts()
Returns the total amount of transactions that were attempted to be enqueued over the snapshot interval.

getTotalEnqueued

public int getTotalEnqueued()
Returns the total amount of transactions that were enqueued over the snapshot interval.

getTotalServiced

public int getTotalServiced()
Returns the total amount of transactions serviced over the snapshot interval.

getTotalExpired

public int getTotalExpired()
Returns the total amount of expired transactions over the snapshot interval.

getTotalServiceExceptions

public int getTotalServiceExceptions()
Returns the number of transactions that were canceled because of an uncaught exception while being serviced.

getTotalUncaughtExceptions

public int getTotalUncaughtExceptions()
Returns the total number of uncaught exceptions in the TransactionQueue. This value is usually the same as the total number of service exceptions. If it is larger, this does necessarily not indicate that the TransactionQueue has an internal error because exceptions can be generated while attempting to cancel a transaction.

getTotalQueueDuration

public long getTotalQueueDuration()
Returns the total time, in milliseconds, that transactions were waiting in the queue.

getTotalServiceDuration

public long getTotalServiceDuration()
Returns the total time, in milliseconds, that transactions were being serviced.

getSnapshotDuration

public long getSnapshotDuration()
Returns the length of the snapshot interval in milliseconds.

getTotalEnqueueFailures

public int getTotalEnqueueFailures()
Returns the total amount of enqueue attempts that failed because the queue was full.

getTotalUnserviced

public int getTotalUnserviced()
Returns the total amount of transactions that weren't serviced because the queue was full, the transaction expired, or an exception was thrown.

getAverageQueueDuration

public double getAverageQueueDuration()
Returns the average amount of time, in milliseconds, that a transaction was in the queue.

getAverageServiceDuration

public double getAverageServiceDuration()
Returns the average amount of time, in milliseconds, it took servicing a transaction.

getEnqueueAttemptRate

public double getEnqueueAttemptRate()
Returns the amount of enqueue attempts per second over the snapshot interval.

getEnqueueSuccessRate

public double getEnqueueSuccessRate()
Returns the amount of successful transaction enqueues per second over the snapshot interval.

getServiceRate

public double getServiceRate()
Returns the amount of transactions serviced per second over the snapshot interval.

getEnqueueFailureRatio

public double getEnqueueFailureRatio()
Returns zero if no enqueues failed, one if all enqueues failed, or a number in between if some failed.