Top Fields Constructors Methods
org.jruby.management

public Class Runtime

extends Object
implements RuntimeMBean
Class Inheritance
All Implemented Interfaces
org.jruby.management.RuntimeMBean
Imports
java.io.PrintWriter, .StringWriter, java.lang.ref.SoftReference, java.util.Arrays, java.util.stream.Stream, com.headius.backport9.stack.StackWalker, org.jruby.Ruby, .RubyException, .RubyThread, org.jruby.exceptions.RaiseException, org.jruby.runtime.ThreadContext, org.jruby.runtime.backtrace.BacktraceData, .TraceType, .TraceType.Format, .TraceType.Gather

Field Summary

Modifier and TypeField and Description
private final SoftReference<Ruby>
private static final StackWalker

Constructor Summary

AccessConstructor and Description
public
Runtime(Ruby ruby)

Method Summary

Modifier and TypeMethod and Description
private static void
public String

Returns:

[String] A string represnetation of the threds that have been dumped with included backtrace.
dumpThreads
(TraceType.Gather
The level of backtrace that get's raised in each thread
gather
)

Dump all the threads that are known to ruby.

public String
public String
public int
public int
public int
public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rubyback to summary
private final SoftReference<Ruby> ruby
WALKERback to summary
private static final StackWalker WALKER

Constructor Detail

Runtimeback to summary
public Runtime(Ruby ruby)

Method Detail

dumpThreadback to summary
private static void dumpThread(Ruby ruby, RubyThread th, TraceType.Gather gather, PrintWriter pw)
dumpThreadsback to summary
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:TraceType.Gather

The level of backtrace that get's raised in each thread

Returns:String

[String] A string represnetation of the threds that have been dumped with included backtrace.

executeRubyback to summary
public String executeRuby(final String code)

Implements org.jruby.management.RuntimeMBean.executeRuby.

fullThreadDumpback to summary
public String fullThreadDump()

Implements org.jruby.management.RuntimeMBean.fullThreadDump.

getBacktraceCountback to summary
public int getBacktraceCount()

Implements org.jruby.management.RuntimeMBean.getBacktraceCount.

getCallerCountback to summary
public int getCallerCount()

Implements org.jruby.management.RuntimeMBean.getCallerCount.

getExceptionCountback to summary
public int getExceptionCount()

Implements org.jruby.management.RuntimeMBean.getExceptionCount.

rawThreadDumpback to summary
public String rawThreadDump()

Implements org.jruby.management.RuntimeMBean.rawThreadDump.

threadDumpback to summary
public String threadDump()

Implements org.jruby.management.RuntimeMBean.threadDump.