aicas logoJamaica 6.4 release 1

javax.realtime
Class NoHeapRealtimeThread

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

public class NoHeapRealtimeThread
extends RealtimeThread

Jamaica Real-Time Specification for Java class NoHeapRealTimeThread.

Threads of this class are guaranteed never to be interrupted by garbage collector activity as long as they run at a priority higher than any RealtimeThread or normal java Thread.

Within JamaicaVM, the use of NoHeapRealtimeThreads is not required since even normal threads are not interrupted by garbage collector activity.

When used with JamaicaVM, even NoHeapRealtimeThreads are permitted to access all objects that were allocated in the garbage collected HeapMemory.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NoHeapRealtimeThread(SchedulingParameters scheduling, MemoryArea area)
          Constructor to create a NoHeapRealtimeThread with the given scheduling parameters and memory area.
NoHeapRealtimeThread(SchedulingParameters scheduling, ReleaseParameters release, MemoryArea area)
          Constructor to create a NoHeapRealtimeThread with the given scheduling and release parameters and memory area.
NoHeapRealtimeThread(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, Runnable logic)
          Constructor to create a NoHeapRealtimeThread using specified scheduling, release, and memory parameters, using the specified memory area, group, and logic.
 
Method Summary
 void start()
          start starts this NoHeapRealtimeThread.
 
Methods inherited from class javax.realtime.RealtimeThread
addIfFeasible, addToFeasibility, currentRealtimeThread, deschedulePeriodic, getCurrentMemoryArea, getInitialMemoryAreaIndex, getMemoryArea, getMemoryAreaStackDepth, getMemoryParameters, getOuterMemoryArea, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, interrupt, removeFromFeasibility, run, schedulePeriodic, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible, sleep, sleep, waitForNextPeriod, waitForNextPeriodInterruptible
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters scheduling,
                            MemoryArea area)
                     throws IllegalArgumentException
Constructor to create a NoHeapRealtimeThread with the given scheduling parameters and memory area.

Parameters:
scheduling - the scheduling parameters to be used for the new NoHeapRealtimeThread. This can be shared with several Schedulable objects. If it is null, a copy of the creator's value will be created in the same memory area as this RealtimeThread object. If it is null and the current thread is a normal Java thread, the scheduling parameters will be set to the default priority.
area - the memory area to be used for the new NoHeapRealtimeThread. area must not be null nor HeapMemory.
Throws:
IllegalArgumentException - iff scheduling is not compatible with the default scheduler, i.e., iff it is non-null and not an instance of PriorityParameters.
IllegalArgumentException - if area is not ScopedMemory or ImmortalMemory.
IllegalAssignmentError - if scheduling or area reside in memory areas whose objects cannot be referred to by this or this object resides in a memory area that cannot be referenced by scheduling.

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters scheduling,
                            ReleaseParameters release,
                            MemoryArea area)
                     throws IllegalArgumentException
Constructor to create a NoHeapRealtimeThread with the given scheduling and release parameters and memory area.

Parameters:
scheduling - the scheduling parameters to be used for the new NoHeapRealtimeThread. This can be shared with several Schedulable objects. If it is null, a copy of the creator's value will be created in the same memory area as this RealtimeThread object. If it is null and the current thread is a normal Java thread, the scheduling parameters will be set to the default priority.
release - ReleaseParameters to be associated with the new thread. This can be shared with several Schedulable objects. If it is null, default release parameters will be used.

area - the memory area to be used for the new NoHeapRealtimeThread. area must neither be null nor HeapMemory.
Throws:
IllegalArgumentException - iff scheduling or release parameters are not compatible with the default scheduler, i.e., iff they are non-null and not an instance of PriorityParameters or PeriodicParameters, AperidodicParameters and SporadicParameters, respectively.
IllegalArgumentException - if area is not ScopedMemory or ImmortalMemory.
IllegalAssignmentError - if scheduling, release, or area reside in memory areas whose objects cannot be referred to by this or this object resides in a memory area that cannot be referenced by scheduling or release.

NoHeapRealtimeThread

public NoHeapRealtimeThread(SchedulingParameters scheduling,
                            ReleaseParameters release,
                            MemoryParameters memory,
                            MemoryArea area,
                            ProcessingGroupParameters group,
                            Runnable logic)
                     throws IllegalArgumentException
Constructor to create a NoHeapRealtimeThread using specified scheduling, release, and memory parameters, using the specified memory area, group, and logic.

If group is null, the thread group is inherited from the + * creating thread unless this RealtimeThread object resides in ScopedMemory. In this case, the thread group will be set to null.

Parameters:
scheduling - the scheduling parameters to be used for the new NoHeapRealtimeThread. This can be shared with several Schedulable objects. If it is null, a copy of the creator's value will be created in the same memory area as this RealtimeThread object. If it is null and the current thread is a normal Java thread, the scheduling parameters will be set to the default priority.
release - ReleaseParameters to be associated with the new thread. This can be shared with several Schedulable objects. If it is null, default release parameters will be used.

memory - MemoryParameters to be associated with the new thread. May be null for unrestricted amount and rate of memory allocation for the new thread.
area - the memory area to be used for the new NoHeapRealtimeThread. area must neither be null nor HeapMemory.
group - ProcessingGroupParameters to be associated with this. This can be shared with several Schedulable objects. If it is null, this will not be associated with any processing group.
logic - Runnable to be used as the logic for this. If it is null, the run() method in this new RealtimeThread object will be called when the thread is started.
Throws:
IllegalArgumentException - iff scheduling or release parameters are not compatible with the default scheduler, i.e., iff they are non-null and not an instance of PriorityParameters or PeriodicParameters, AperidodicParameters and SporadicParameters, respectively.
IllegalAssignmentError - if scheduling, release, memory, area, group, or logic reside in memory areas whose objects cannot be referred to by this or this object resides in a memory area that cannot be referenced by scheduling, release, or memory.
Method Detail

start

public void start()
start starts this NoHeapRealtimeThread. Previously, it checks that this object, its logic, scheduling parameters, release parameters, memory parameters, processing group, and scheduler all do not reside in heap memory.

Overrides:
start in class RealtimeThread
Throws:
MemoryAccessError - if this object, its logic, scheduling parameters, release parameters, memory parameters, processing group, or scheduler do not reside in heap memory.

aicas logoJamaica 6.4 release 1

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