javax.realtime
Class NoHeapRealtimeThread

java.lang.Object
  extended byjava.lang.Thread
      extended byjavax.realtime.RealtimeThread
          extended byjavax.realtime.NoHeapRealtimeThread
All Implemented Interfaces:
Runnable, Schedulable

public class NoHeapRealtimeThread
extends RealtimeThread

A NoHeapRealtimeThread is a specialized form of RealtimeThread. Because an instance of NoHeapRealtimeThread may immediately preempt any implemented garbage collector logic contained in its run() is never allowed to allocate or reference any object allocated in the heap nor is it even allowed to manipulate any reference toany object in the heap. For example, if a and b are objects in immortal memory, b.p is reference to an object on the heap, and a.p is type compatible with b.p, then a NoHeapRealtimeThread is not allowed to execute anything like the following:

a.p = b.p; b.p = null;

Thus,it is always safe for a NoHeapRealtimeThread to interrupt the garbage collector at any time, without waiting for the end of the garbage collection cycle or a defined preemption point. Due to these restrictions, a NoHeapRealtimeThread object must be placed in a memory area such that thread logic may unexceptionally access instance variables and such that Java methods on Thread (e.g., enumerate and join) complete normally except where execution would cause access violations. The constructors of NoHeapRealtimeThread require a reference to ScopedMemory or ImmortalMemory . When the thread is started, all execution occurs in the scope of the given memory area. Thus, all memory allocation performed with the new operator is taken from this given area. Parameters for constructors may be null . In such cases the default value will be the default value set for the particular type by the associated instance of Scheduler.

Author:
Angelo Corsaro

Field Summary
 
Fields inherited from class javax.realtime.RealtimeThread
deadlineMissHandler, eligibilityParam, groupParam, hasMissedDeadline, hasMissHandlers, hasOverrun, hasOverrunHandlers, hasStarted, hasStartedTimer, isPeriodic, logic, memoryParam, missCondition, overrunHandler, periodExpired, pipeID_, releaseParam, scheduler, schedulingParam, scopeStack, timeoutHandler_, waitingForNextPeriod
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NoHeapRealtimeThread()
          Creates a new NoHeapRealtimeThread instance.
NoHeapRealtimeThread(Runnable logic)
          Creates a new NoHeapRealtimeThread instance.
NoHeapRealtimeThread(SchedulingParameters schedulingParam, MemoryArea memoryArea)
          Creates a new NoHeapRealtimeThread instance with the given characteristics.
NoHeapRealtimeThread(SchedulingParameters schedulingParam, ReleaseParameters releaseParam, MemoryArea memoryArea)
          Creates a new NoHeapRealtimeThread instance with the given characteristics and a java.lang.Runnable.
NoHeapRealtimeThread(SchedulingParameters schedulingParam, ReleaseParameters releaseParam, MemoryParameters memoryParam, MemoryArea memoryArea, ProcessingGroupParameters groupParam, Runnable logic)
          Creates a new NoHeapRealtimeThread instance with the given characteristics and a java.lang.Runnable.
 
Methods inherited from class javax.realtime.RealtimeThread
addIfFeasible, addToFeasibility, currentRealtimeThread, deschedulePeriodic, executionEligibility, getActiveMemoryArea, getCurrentMemoryArea, getInitialMemoryAreaIndex_, getInitialMemoryAreaIndex, getMemoryAreaStackDepth_, getMemoryAreaStackDepth, getMemoryParameters, getOuterMemoryArea_, getOuterMemoryArea, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, getScopeStack, interrupt, removeFromFeasibility, rtfini_, run, schedulePeriodic, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible, setTopMemoryArea, setupTimeoutHandler, setupTSS, sleep, sleep, sleep, sleep, sleep, sleep, start, updatePeriodicParameters, validateSchedulingParameters, waitForNextPeriod, yield
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters schedulingParam,
                            MemoryArea memoryArea)
Creates a new NoHeapRealtimeThread instance with the given characteristics.

Parameters:
schedulingParam - The SchedulingParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
memoryArea - The MemoryArea associated with this.

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters schedulingParam,
                            ReleaseParameters releaseParam,
                            MemoryArea memoryArea)
Creates a new NoHeapRealtimeThread instance with the given characteristics and a java.lang.Runnable.

Parameters:
schedulingParam - The SchedulingParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
releaseParam - The ReleaseParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
memoryArea - The MemoryArea associated with this.

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters schedulingParam,
                            ReleaseParameters releaseParam,
                            MemoryParameters memoryParam,
                            MemoryArea memoryArea,
                            ProcessingGroupParameters groupParam,
                            Runnable logic)
Creates a new NoHeapRealtimeThread instance with the given characteristics and a java.lang.Runnable.

Parameters:
schedulingParam - The SchedulingParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
releaseParam - The ReleaseParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
memoryParam - The MemoryParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
memoryArea - The MemoryArea associated with this.
groupParam - -The ProcessingGroupParameters associated with this (and possibly other instances of NoHeapRealtimeThread).
logic - the logic for this thread.

NoHeapRealtimeThread

public NoHeapRealtimeThread()
Creates a new NoHeapRealtimeThread instance. All parameter values are null.


NoHeapRealtimeThread

public NoHeapRealtimeThread(Runnable logic)
Creates a new NoHeapRealtimeThread instance. All parameter values are null, but the logic.

Parameters:
logic - a Runnable representing the thread logic.


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2005 Angelo Corsaro and Morgan Deters.