aicas logoJamaica 6.4 release 1

javax.realtime
Class RealtimeSystem

java.lang.Object
  extended by javax.realtime.RealtimeSystem

public final class RealtimeSystem
extends Object

Jamaica Real-Time Specification for Java class RealtimeSystem.

This class provides access to global status information on the real-time system and the Real-Time Specification for Java status. This includes memory related information (endianess, GC), Java monitor information and security.


Field Summary
static byte BIG_ENDIAN
          Byte-order mode in which higher values appear at lower memory addresses.
static byte BYTE_ORDER
          Byte order of the current hardware of the system this is running on.
static byte LITTLE_ENDIAN
          Byte-order mode in which lower values appear at lower memory addresses.
 
Constructor Summary
RealtimeSystem()
           
 
Method Summary
static GarbageCollector currentGC()
           currentGC returns the singleton instance of the garbage collector used by the system to recycle memory allocated in HeapMemory.
static int getConcurrentLocksUsed()
          getConcurrentLocksUsed returns the number of locks that have been used concurrently by the system.
static MonitorControl getInitialMonitorControl()
          Get the monitor control object of the policy that is used during system startup.
static int getMaximumConcurrentLocks()
           getMaximumConcurrentLocks returns the number of locks that may be used concurrently without requiring an extra overhead (for allocating an extra monitor object or similar).
static RealtimeSecurity getSecurityManager()
          getSecurityManager returns the current security manager instance.
static void setMaximumConcurrentLocks(int max)
          setMaximumConcurrentLocks sets the maximum number of locks that may be used simultaneously.
static void setMaximumConcurrentLocks(int max, boolean hard)
          setMaximumConcurrentLocks sets the maximum number of locks that may be used simultaneously.
static void setSecurityManager(RealtimeSecurity manager)
          setSecurityManager replaces the current security manager by a new manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIG_ENDIAN

public static final byte BIG_ENDIAN
Byte-order mode in which higher values appear at lower memory addresses.


LITTLE_ENDIAN

public static final byte LITTLE_ENDIAN
Byte-order mode in which lower values appear at lower memory addresses.


BYTE_ORDER

public static final byte BYTE_ORDER
Byte order of the current hardware of the system this is running on. This is either BIG_ENDIAN or LITTLE_ENDIAN.

Constructor Detail

RealtimeSystem

public RealtimeSystem()
Method Detail

currentGC

public static GarbageCollector currentGC()

currentGC returns the singleton instance of the garbage collector used by the system to recycle memory allocated in HeapMemory. For JamaicaVM, this is the garbage collector described in

Fridtjof Siebert, Hard Real-Time Garbage Collection in Modern Object Oriented Programming Languages, aicas GmbH, Karlsruhe, 2002, ISBN 3-8311-3893-1

Returns:
the current instance of the garbage collector.

getConcurrentLocksUsed

public static int getConcurrentLocksUsed()
getConcurrentLocksUsed returns the number of locks that have been used concurrently by the system. This may be used to tune the system on a call to setMaximumConcurrentLocks. If the system does not track this number, -1 is returned. JamaicaVM does not limit the maximum number of locks used concurrently, so it also does not track the number, this function always returns -1.

Returns:
the maximum number of lacks that were used concurrently, or -1 if this number is not known.

getMaximumConcurrentLocks

public static int getMaximumConcurrentLocks()

getMaximumConcurrentLocks returns the number of locks that may be used concurrently without requiring an extra overhead (for allocating an extra monitor object or similar).

For JamaicaVM, there is not restriction on the number of locks that may be used concurrently, and there is no extra overhead on the use of a lock since all required information is inlined. This function returns Integer.MAX_VALUE for JamaicaVM.

Returns:
the number of locks that can be used simultaneously by this implementation.

getSecurityManager

public static RealtimeSecurity getSecurityManager()
getSecurityManager returns the current security manager instance.

Returns:
the current security manager.

setMaximumConcurrentLocks

public static void setMaximumConcurrentLocks(int max)

setMaximumConcurrentLocks sets the maximum number of locks that may be used simultaneously. This may be used by systems that require a preallocated set of locks for efficient monitor access.

In JamaicaVM, no allocation of specific memory of locks is required, this function has no effect in JamaicaVM.

Parameters:
max - The maximum number of locks.

setMaximumConcurrentLocks

public static void setMaximumConcurrentLocks(int max,
                                             boolean hard)

setMaximumConcurrentLocks sets the maximum number of locks that may be used simultaneously. This may be used by systems that require a preallocated set of locks for efficient monitor access.

In JamaicaVM, no allocation of specific memory of locks is required, this function has no effect in JamaicaVM.

Parameters:
max - The maximum number of locks.
hard - if this parameter is set, exceeding the number of permitted locks at runtime will cause a ResourceLimitError. On JamaicaVM, there is no such limit, so this parameter is ignored.

setSecurityManager

public static void setSecurityManager(RealtimeSecurity manager)
setSecurityManager replaces the current security manager by a new manager.

Parameters:
manager - the new security manager.
Throws:
IllegalArgumentException - if manger is null.
SecurityException - if the security manager has already been set.

getInitialMonitorControl

public static MonitorControl getInitialMonitorControl()
Get the monitor control object of the policy that is used during system startup.

Returns:
original monitor control policy.
Since:
RTSJ V1.0.1

aicas logoJamaica 6.4 release 1

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