Top Fields Constructors Methods
org.jruby.ext.monitor

public Class Monitor

extends RubyObject
Class Inheritance
Annotations
@JRubyClass
name:Monitor
Imports
org.jruby.Ruby, .RubyBoolean, .RubyClass, .RubyObject, .RubyThread, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.ext.thread.Mutex, org.jruby.runtime.Block, .JavaSites, .ThreadContext, org.jruby.runtime.builtin.IRubyObject

Field Summary

Modifier and TypeField and Description
private volatile long
private final Mutex
private volatile RubyThread
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public
Monitor(Ruby runtime, RubyClass klass)

Method Summary

Modifier and TypeMethod and Description
private void
public static void
public IRubyObject
public IRubyObject
private long
public IRubyObject
public IRubyObject
public RubyBoolean
private boolean
private static JavaSites.MonitorSites
sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Retrieve the call sites for this class.

public IRubyObject
public RubyBoolean
public IRubyObject
Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

countback to summary
private volatile long count
mutexback to summary
private final Mutex mutex
ownerback to summary
private volatile RubyThread owner

Constructor Detail

Monitorback to summary
public Monitor(Ruby runtime, RubyClass klass)

Method Detail

checkOwnerback to summary
private void checkOwner(ThreadContext context)
createMonitorClassback to summary
public static void createMonitorClass(ThreadContext context)
enterback to summary
public IRubyObject enter(ThreadContext context)
Annotations
@JRubyMethod
exitback to summary
public IRubyObject exit(ThreadContext context)
Annotations
@JRubyMethod
exitForConditionback to summary
private long exitForCondition()
mon_check_ownerback to summary
public IRubyObject mon_check_owner(ThreadContext context)
Annotations
@JRubyMethod
mon_locked_pback to summary
public IRubyObject mon_locked_p(ThreadContext context)
Annotations
@JRubyMethod
name:mon_locked?
mon_owned_pback to summary
public RubyBoolean mon_owned_p(ThreadContext context)
Annotations
@JRubyMethod
name:mon_owned?
ownedByCurrentThreadback to summary
private boolean ownedByCurrentThread(ThreadContext context)
sitesback to summary
private static JavaSites.MonitorSites sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Doc from org.jruby.RubyBasicObject.sites.

Retrieve the call sites for this class. It is expected that all Java-based core classes that do call site caching will have a similar method.

synchronizeback to summary
public IRubyObject synchronize(ThreadContext context, Block block)
Annotations
@JRubyMethod
try_enterback to summary
public RubyBoolean try_enter(ThreadContext context)
Annotations
@JRubyMethod
wait_for_condback to summary
public IRubyObject wait_for_cond(ThreadContext context, IRubyObject cond, IRubyObject timeout)
Annotations
@JRubyMethod