|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.MonitorControl
Abstract superclass for all monitor control policy objects.
Not currently implemented
Field Summary | |
protected static java.util.Hashtable |
controlPolicies
|
protected static MonitorControl |
defaultPolicy
|
Constructor Summary | |
protected |
MonitorControl()
Invoked from subclass constructors. |
Method Summary | |
static MonitorControl |
getMonitorControl()
Gets the current default monitor control policy. |
static MonitorControl |
getMonitorControl(java.lang.Object obj)
Gets the monitor control policy of the given instance of Object. |
static MonitorControl |
setMonitorControl(MonitorControl policy)
Sets the default monitor control policy. |
static MonitorControl |
setMonitorControl(java.lang.Object obj,
MonitorControl policy)
Immediately sets policy as the monitor control policy for obj . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.util.Hashtable controlPolicies
protected static MonitorControl defaultPolicy
Constructor Detail |
protected MonitorControl()
Method Detail |
public static MonitorControl getMonitorControl()
public static MonitorControl getMonitorControl(java.lang.Object obj)
obj
- The object being queried.
public static MonitorControl setMonitorControl(MonitorControl policy)
Like the per-object method (see
setMonitorControl(Object, MonitorControl)
, the setting of
the default monitor control policy occurs immediately.
policy
- The new monitor control policy. If null nothing happens.
MonitorControl
policy that was replaced.
java.lang.SecurityException
- Thrown if the caller is not permitted
to alter the default monitor control policy.
java.lang.IllegalArgumentException
- - Thrown if policy is not in
immortal memory.
java.lang.UnsupportedOperationException
- - Thrown if policy is not
a supported monitor control policy.public static MonitorControl setMonitorControl(java.lang.Object obj, MonitorControl policy)
obj
.
A thread or schedulable object that is queued for the lock associated
with obj
, or is in obj
's wait set, is not
rechecked (e.g., for a
CeilingViolationException
) under policy, either as part
of the execution
of setMonitorControl
or when it is awakened to (re)acquire the
lock.
The thread or schedulable object invoking setMonitorControl
must already hold the lock on obj
.
obj
- The object that will be governed by the new policy.policy
- The new policy for the object. If null
nothing will happen.
MonitorControl
policy for obj
, which will
be replaced.
java.lang.IllegalArgumentException
- Thrown when obj
is
null
or
policy
is not in immortal memory.
java.lang.UnsupportedOperationException
- Thrown if policy
is not a supported monitor control policy.
java.lang.IllegalMonitorStateException
- Thrown if the caller
does not hold a lock on obj
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |