|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.jRateSystem
The class jRateSystem
contains information about
jRate's runtime and configuration.
Method Summary | |
static boolean |
dropRootPrivileges(int uid)
Permanently drop superuser privileges for this process. |
static boolean |
dropRootPrivileges(String username)
Permanently drop superuser privileges for this process. |
static MemoryArea |
getHeap()
Returns an instance of the singleton Heap. |
static MemoryArea |
getImmortalMemory()
Returns an instance to the singleton ImmortalMemory. |
static MemoryArea |
getMethodArea()
Returns an instance to the singleton MethodArea |
static int |
getRealtimeThreadSchedulingPolicy()
Returns the scheduling policy that is used to scheduler Java Real-Time Threads. |
static int |
getThreadSchedulingPolicy()
Returns the scheduling policy that is used to scheduler Java Threads. |
static boolean |
hasRTNPTL()
Whether jRate was compiled with RTNPTL support. |
static boolean |
inRTSJComplianceMode()
Determine whether jRate is currently running in RTSJ-compliance mode. |
static boolean |
isHeapAllocationNoisy()
Queries whether heap allocations are currently noisy. |
static boolean |
isImmortalAllocationNoisy()
Queries whether immortal allocations are currently noisy. |
static boolean |
isRoot()
Whether jRate is currently running as root. |
static void |
requireRTSJCompliance()
Determine whether this installation of jRate is capable of RTSJ-compliance mode. |
static boolean |
respectsPriority()
Determine whether jRate will respect thread priorities. |
static void |
setNoisyHeapAllocation(boolean noisy)
Sets heap allocations to be noisy or not. |
static void |
setNoisyImmortalAllocation(boolean noisy)
Sets immortal allocations to be noisy or not. |
static boolean |
supportsMonitorControl()
Determine whether jRate will respect specified priority inheritance and priority ceiling behaviors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int getThreadSchedulingPolicy()
int
value representing the scheduling
policy.public static int getRealtimeThreadSchedulingPolicy()
int
value representing the scheduling
policy.public static MemoryArea getImmortalMemory()
MemoryArea
valuepublic static MemoryArea getHeap()
MemoryArea
valuepublic static MemoryArea getMethodArea()
MemoryArea
valuepublic static boolean dropRootPrivileges(int uid)
Effective UIDs are kept on a per-thread basis. Note that
this is true whether using LinuxThreads (where each thread is
a separate process) or NPTL (where all threads run under a
single process ID). Therefore, superuser privileges are
only dropped for the calling thread, not all threads
that are already executing. New threads that are created and
started from this thread (after dropping superuser privileges)
will run as the unprivileged user. Threads that aren't running
with superuser privileges may not be able to set scheduling
parameters like priority, which means that not only will PriorityParameters
not work, but monitor
control policies
may not either.
uid
- the numeric user ID
RuntimeException
- something went wrong (perhaps illegal
UID)public static boolean dropRootPrivileges(String username)
On Linux, threads are implemented in kernel as processes, so
note that superuser privileges are only dropped for
the calling thread, not all threads that are executing. New
threads that are created and started from this thread (after
dropping superuser privileges) will run as the unprivileged
user. Threads that aren't running with superuser privileges
may not be able to set scheduling parameters like priority,
which means that not only will PriorityParameters
not
work, but neither will monitor control
policies
.
username
- the username
RuntimeException
- something went wrong (perhaps unknown
username)public static boolean isRoot()
public static boolean hasRTNPTL()
http://developer.osdl.org/dev/robustmutexes/
public static boolean respectsPriority()
This function returns true if and only if the threading library upon which jRate is running is believed to properly respect priorites in the following cases on a uniprocessor machine:
On multiprocessor (or hyperthreaded) machines, lock stealing may be possible during lock transition.
public static boolean supportsMonitorControl()
public static boolean inRTSJComplianceMode()
public static void requireRTSJCompliance()
public static void setNoisyHeapAllocation(boolean noisy)
public static void setNoisyImmortalAllocation(boolean noisy)
public static boolean isHeapAllocationNoisy()
public static boolean isImmortalAllocationNoisy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |