bb.util
Class ThreadMonitor.UnitTest.ThreadMeasurerTest

java.lang.Object
  extended by bb.util.ThreadMeasurer
      extended by bb.util.ThreadMonitor.UnitTest.ThreadMeasurerTest
Enclosing class:
ThreadMonitor.UnitTest

private static class ThreadMonitor.UnitTest.ThreadMeasurerTest
extends ThreadMeasurer

Extends ThreadMeasurer to deliberately throw a RuntimeException when makeFail called.


Nested Class Summary
 
Nested classes/interfaces inherited from class bb.util.ThreadMeasurer
ThreadMeasurer.UnitTest
 
Field Summary
private  boolean fail
           
 
Constructor Summary
private ThreadMonitor.UnitTest.ThreadMeasurerTest()
           
 
Method Summary
 String getThreadState()
          Returns a String description of the thread state of the monitored JVM.
private  void makeFail()
           
 
Methods inherited from class bb.util.ThreadMeasurer
appendThreadInfo, appendThreadInfoArray, attemptCpuTimeMeasurement, attemptThreadContentionMonitoring, getDeadlockState, getThreadMXBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fail

private boolean fail
Constructor Detail

ThreadMonitor.UnitTest.ThreadMeasurerTest

private ThreadMonitor.UnitTest.ThreadMeasurerTest()
Method Detail

getThreadState

public String getThreadState()
                      throws RuntimeException
Description copied from class: ThreadMeasurer
Returns a String description of the thread state of the monitored JVM.

Contract: the result is never null.

Overrides:
getThreadState in class ThreadMeasurer
Throws:
UnsupportedOperationException - if ThreadMeasurer.reportThreadTimes was set to true in the constructor but some other class called ThreadMeasurer.threadMXBean.setThreadCpuTimeEnabled(false).
RuntimeException

makeFail

private void makeFail()