javax.realtime
Class MonitorControl

java.lang.Object
  |
  +--javax.realtime.MonitorControl
Direct Known Subclasses:
PriorityCeilingEmulation, PriorityInheritance

public abstract class MonitorControl
extends java.lang.Object

Abstract superclass for all monitor control policy objects.


Field Summary
protected static javax.realtime.MonitorControl defaultMonitorControl
           
 
Constructor Summary
MonitorControl()
          Create an instance of MonitorControl.
 
Method Summary
static javax.realtime.MonitorControl getMonitorControl()
          Gets the monitor control policy of the given instance of this.
static javax.realtime.MonitorControl getMonitorControl(java.lang.Object monitor)
          Gets the monitor control policy of the given instance of Object.
static void setMonitorControl(javax.realtime.MonitorControl policy)
          Sets the default monitor behavior for object monitors used by synchronized statements and methods in the system.
static void setMonitorControl(java.lang.Object monitor, javax.realtime.MonitorControl monCtl)
          Has the same effect as setMonitorControl(), except that the policy only affects the indicated object monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultMonitorControl

protected static javax.realtime.MonitorControl defaultMonitorControl
Constructor Detail

MonitorControl

public MonitorControl()
Create an instance of MonitorControl.

Method Detail

getMonitorControl

public static javax.realtime.MonitorControl getMonitorControl()
Gets the monitor control policy of the given instance of this.

Returns:
The monitor control policy object.

getMonitorControl

public static javax.realtime.MonitorControl getMonitorControl(java.lang.Object monitor)
Gets the monitor control policy of the given instance of Object.

Returns:
The monitor control policy object.

setMonitorControl

public static void setMonitorControl(javax.realtime.MonitorControl policy)
Sets the default monitor behavior for object monitors used by synchronized statements and methods in the system. The type of the policy object determines the type of behavior. Conforming implementations must support priority ceiling emulation and priority inheritance for fixed priority preemptive threads.

Parameters:
policy - The new monitor control policy. If null nothing happens.

setMonitorControl

public static void setMonitorControl(java.lang.Object monitor,
                                     javax.realtime.MonitorControl monCtl)
Has the same effect as setMonitorControl(), except that the policy only affects the indicated object monitor.

Parameters:
monitor - The monitor for which the new policy will be in use. The policy will take effect on the first attempt to lock the monitor after the completion of this method. If null nothing will happen.