aicas logoJamaica 6.1 release 1

javax.realtime
Class PriorityCeilingEmulation

java.lang.Object
  extended by javax.realtime.MonitorControl
      extended by javax.realtime.PriorityCeilingEmulation

public class PriorityCeilingEmulation
extends MonitorControl

PriorityCeilingEmulation provides an alternative monitor behaviour to the default PriorityInheritance policy. PriorityCeilingEmulation uses the priority ceiling protocol, i.e., the priority of a thread that holds a priority ceiling monitor is risen to the monitor's ceiling priority.


Constructor Summary
PriorityCeilingEmulation(int ceiling)
          Deprecated. RTSJ V1.0.1 use PriorityCeiling.instance(ceiling) instead.
 
Method Summary
 int getCeiling()
          getCeiling returns the ceiling priority for this monitor control.
 int getDefaultCeiling()
          Deprecated. RTSJ V1.0.1 the name is misleading, use getCeiling instead.
static PriorityCeilingEmulation getMaxCeiling()
          getMaxCeiling returns a monitor control for priority ceiling emulation using the maximum priority (PriorityScheduler.instance().getMaxPriority()).
static PriorityCeilingEmulation instance(int ceiling)
          instance returns the unique instance of monitor control for priority ceiling emulation using the given ceiling priority.
 
Methods inherited from class javax.realtime.MonitorControl
getMonitorControl, getMonitorControl, setMonitorControl, setMonitorControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityCeilingEmulation

public PriorityCeilingEmulation(int ceiling)
Deprecated. RTSJ V1.0.1 use PriorityCeiling.instance(ceiling) instead.

Constructor to create a new instance for a given ceiling priority.

require

   (ceiling >= Thread.MIN_PRIORITY,
    ceiling <= PriorityScheduler.MAX_PRIORITY);
 

ensure

   (Result.getCeiling() == ceiling);
 

Parameters:
ceiling - The ceiling priority for the new monitor control.
Throws:
IllegalArgumentException - iff ceiling is not in the range Thread.MIN_PRIORITY..PriorityScheduler.MAX_PRIORITY.
Method Detail

getCeiling

public int getCeiling()
getCeiling returns the ceiling priority for this monitor control.

Returns:
the ceiling priority.

getDefaultCeiling

public int getDefaultCeiling()
Deprecated. RTSJ V1.0.1 the name is misleading, use getCeiling instead.

getDefaultCeiling is a misleadingly named method with the same semantics as getCeiling().

Returns:
the ceiling priority.

getMaxCeiling

public static PriorityCeilingEmulation getMaxCeiling()
getMaxCeiling returns a monitor control for priority ceiling emulation using the maximum priority (PriorityScheduler.instance().getMaxPriority()).

The result will be allocated in ImmortalMemory if -strictRTSJ is specified for JamaicaVM. Otherwise, it will reside in HeapMemory.

Returns:
the priority ceiling policy with maximum priority.

instance

public static PriorityCeilingEmulation instance(int ceiling)
instance returns the unique instance of monitor control for priority ceiling emulation using the given ceiling priority.

The result will be allocated in ImmortalMemory if -strictRTSJ is specified for JamaicaVM. Otherwise, it will reside in HeapMemory.

The ceiling must be between PriorityScheduler.instance().getMinPriority() and PriorityScheduler.instance().getMaxPriority() if -strictRTSJ is specified for JamaicaVM, otherwise, it must be in the range Thread.MIN_PRIORITY through PriorityScheduler.instance().getMaxPriority().

Returns:
the priority ceiling policy for the given priority.
Throws:
IllegalArgumentException - if ceiling is outside of the range of permitted priority values.
Since:
RTSJ V1.0.1

aicas logoJamaica 6.1 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2012 aicas GmbH. All Rights Reserved.