javax.realtime
Class RealtimeSystem

java.lang.Object
  extended byjavax.realtime.RealtimeSystem

public final class RealtimeSystem
extends Object

Provides access to some system parameters.

Since:
0.3.8
Author:
Morgan Deters

Field Summary
static byte BIG_ENDIAN
          A descriptor for identifying big endian byte order.
static byte BYTE_ORDER
          A descriptor for identifying the execution platform's native byte order.
static byte LITTLE_ENDIAN
          A descriptor for identifying little endian byte order.
 
Method Summary
static GarbageCollector currentGC()
          Returns the currently-active garbage collector.
static int getConcurrentLocksUsed()
          Returns the highest number of locks that have been held concurrently.
static MonitorControl getInitialMonitorControl()
          Returns a MonitorControl object representing the initial monitor control policy.
static int getMaximumConcurrentLocks()
          Gets the maximum concurrent number of locks.
static RealtimeSecurity getSecurityManager()
          Gets the current real-time security manager.
static void setMaximumConcurrentLocks(int numLocks)
          Sets the expected maximum number of locks that will be held (or waited on) concurrently.
static void setMaximumConcurrentLocks(int number, boolean hard)
          Sets the expected maximum number of locks that will be held (or waited on) concurrently.
static void setSecurityManager(RealtimeSecurity manager)
          Sets the real-time security manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LITTLE_ENDIAN

public static final byte LITTLE_ENDIAN
A descriptor for identifying little endian byte order.

See Also:
Constant Field Values

BIG_ENDIAN

public static final byte BIG_ENDIAN
A descriptor for identifying big endian byte order.

See Also:
Constant Field Values

BYTE_ORDER

public static final byte BYTE_ORDER
A descriptor for identifying the execution platform's native byte order.

Method Detail

currentGC

public static GarbageCollector currentGC()
Returns the currently-active garbage collector.

Returns:
the currently-active garbage collector

getConcurrentLocksUsed

public static int getConcurrentLocksUsed()
Returns the highest number of locks that have been held concurrently.

Returns:
the highest number of locks that have been held concurrently

getInitialMonitorControl

public static MonitorControl getInitialMonitorControl()
Returns a MonitorControl object representing the initial monitor control policy.

Returns:
a MonitorControl object representing the initial monitor control policy

getMaximumConcurrentLocks

public static int getMaximumConcurrentLocks()
Gets the maximum concurrent number of locks.

Returns:
the maximum concurrent number of locks

getSecurityManager

public static RealtimeSecurity getSecurityManager()
Gets the current real-time security manager.

Returns:
the security manager object

setMaximumConcurrentLocks

public static void setMaximumConcurrentLocks(int numLocks)
Sets the expected maximum number of locks that will be held (or waited on) concurrently. Holding (or waiting on) additional locks may incur additional execution time overhead.

Parameters:
numLocks - the expected maximum number of locks that will be held (or waited on) concurrently; if zero or negative, nothing happens

setMaximumConcurrentLocks

public static void setMaximumConcurrentLocks(int number,
                                             boolean hard)
Sets the expected maximum number of locks that will be held (or waited on) concurrently. Holding (or waiting on) additional locks may incur additional execution time overhead.

Parameters:
number - the expected maximum number of locks that will be held (or waited on) concurrently; if zero or negative, nothing happens
hard - if true, the limit is hard and may not be exceeded (and attempts to exceed it will result in a ResourceLimitError);

setSecurityManager

public static void setSecurityManager(RealtimeSecurity manager)
Sets the real-time security manager. The RTSJ is somewhat unclear on where this is permitted. jRate allows this method to be called once by the application; all subsequent calls result in a SecurityException. Further, if multiple calls are made to this method concurrently, only one will succeed and the rest will throw a SecurityException.

Parameters:
manager - the security manager to use
Throws:
SecurityException - if the real-time security manager has already been set


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