Class Runtime

java.lang.Object
org.jruby.management.Runtime
All Implemented Interfaces:
RuntimeMBean

public class Runtime extends Object implements RuntimeMBean
  • Constructor Details

    • Runtime

      public Runtime(Ruby ruby)
  • Method Details

    • getExceptionCount

      public int getExceptionCount()
      Specified by:
      getExceptionCount in interface RuntimeMBean
    • getBacktraceCount

      public int getBacktraceCount()
      Specified by:
      getBacktraceCount in interface RuntimeMBean
    • getCallerCount

      public int getCallerCount()
      Specified by:
      getCallerCount in interface RuntimeMBean
    • threadDump

      public String threadDump()
      Specified by:
      threadDump in interface RuntimeMBean
    • rawThreadDump

      public String rawThreadDump()
      Specified by:
      rawThreadDump in interface RuntimeMBean
    • fullThreadDump

      public String fullThreadDump()
      Specified by:
      fullThreadDump in interface RuntimeMBean
    • dumpThreads

      public String dumpThreads(TraceType.Gather gather)
      Dump all the threads that are known to ruby. We first discover any running threads and then raise an exception in each thread adding the current thread and it's context to the backtrace.
      Parameters:
      gather - The level of backtrace that get's raised in each thread
      Returns:
      [String] A string represnetation of the threds that have been dumped with included backtrace.
    • executeRuby

      public String executeRuby(String code)
      Specified by:
      executeRuby in interface RuntimeMBean