public final class RealtimeSystem
extends java.lang.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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
RealtimeSystem() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final byte BIG_ENDIAN
public static final byte LITTLE_ENDIAN
public static final byte BYTE_ORDER
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
public static int getConcurrentLocksUsed()
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.
public static RealtimeSecurity getSecurityManager()
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.
max
- The maximum number of locks.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.
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.public static void setSecurityManager(RealtimeSecurity manager)
manager
- the new security manager.java.lang.IllegalArgumentException
- if manger is null.java.lang.SecurityException
- if the security manager has already
been set.public static MonitorControl getInitialMonitorControl()
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2022 aicas GmbH. All Rights Reserved.