|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JRockitConsoleMXBean
Interface for functionality very specific to the JRockit Management Console. Here things like starting a JRA recording should live. This one contains our own defined composite MXBean types, and can only be used if both the server and the client is a JRockit. This interface is bound to change in the future and should be viewed as experimental.
Field Summary | |
---|---|
static java.lang.String |
NOTIFICATION_GARBAGE_COLLECTION
|
static java.lang.String |
NOTIFICATION_GARBAGE_COLLECTION_STRATEGY_CHANGED
|
Method Summary | |
---|---|
void |
closeJRARecording()
Close the current JRA recording. |
javax.management.openmbean.CompositeData |
getCPUDescriptions()
|
javax.management.openmbean.CompositeData |
getCPULoads()
Returns the CPU load for all CPU:s on a machine. |
long |
getCurrentTime()
Returns the current system time |
MarkAndSweepStrategy |
getGarbageCollectionStrategy()
The strategy shows the currently used garbage collection strategy employed to meet the goals defined by the heuristic. |
int |
getMLSPort()
Check if the server is started, will return 0 if not started, otherwise returns the port it is listening to |
int[] |
getMLSVersions()
Returns an array containing the protocol versions supported in the available implementation of the memory leak server. |
boolean |
isThrowable(java.lang.String className)
Returns true if the first class retrieved from the class library with this name is a throwable. |
byte[] |
readJRARecording()
Reads a block of bytes from a finished JRA recording. |
void |
runCtrlBreakHandler(java.lang.String breakHandler)
Runs the ctrlbreak handler. |
java.lang.String |
runCtrlBreakHandlerWithResult(java.lang.String breakHandler)
Runs the CtrlBreak handler and returns the result as a String. |
void |
setGarbageCollectionStrategy(MarkAndSweepStrategy strategy)
Sets the garbage collection strategy to use. |
void |
shutDownMLS()
Shutdown the memleak server. |
boolean |
startJRARecording(int recordingTime,
boolean useNativeSamples,
boolean useMethodSampling,
boolean useGCSampling)
Starts a JRA recording. |
boolean |
startJRARecording(int recordingTime,
java.lang.String filename,
boolean useNativeSamples,
boolean useMethodSampling,
boolean useGCSampling)
Starts a JRA recording. |
int |
startMLS(int version,
int port)
Starts the memory leak server. |
boolean |
stopJRARecording()
Stops the JRA recording. |
Field Detail |
---|
static final java.lang.String NOTIFICATION_GARBAGE_COLLECTION_STRATEGY_CHANGED
static final java.lang.String NOTIFICATION_GARBAGE_COLLECTION
Method Detail |
---|
long getCurrentTime()
boolean isThrowable(java.lang.String className)
className
- name
boolean startJRARecording(int recordingTime, boolean useNativeSamples, boolean useMethodSampling, boolean useGCSampling) throws java.io.IOException, java.lang.Exception
java.io.File.createTempFile(java.lang.String, java.lang.String, java.io.File)
using "jrockit" as the prefix and
".jra" as the suffix. The file can later be accessed using the
method readJRARecording()
. Returns true
if it
was successfully started.
recordingTime
- sample time in secondsuseNativeSamples
- true
if native sampling should be useduseMethodSampling
- true
if method sampling should be useduseGCSampling
- true
if GC sampling should be used
true
if it was successfully started.
java.io.IOException
- if no temporary file could be opened
java.lang.SecurityException
- if you haven't got the ManagementPermission monitor.
java.lang.Exception
- if some other problem happend when starting, such
as license issues, out of memory, and so onbyte[] readJRARecording() throws java.io.IOException
java.io.IOException
- if something went wrong when attempting to read the file.void closeJRARecording() throws java.io.IOException
readJRARecording()
java.io.IOException
boolean startJRARecording(int recordingTime, java.lang.String filename, boolean useNativeSamples, boolean useMethodSampling, boolean useGCSampling) throws java.lang.Exception
stopJRARecording()
. The only way to access this
recording is by using the created file. You cannot read the result with
readJRARecording()
.
recordingTime
- sample time in secondsfilename
- A file name, on the server, of recording dumpuseNativeSamples
- true if native sampling should be useduseMethodSampling
- true if method sampling should be useduseGCSampling
- true if GC sampling should be used
java.lang.SecurityException
- if you haven't got the ManagementPermission monitor.
java.lang.Exception
- if some other problem happend when starting, such
as license issues, out of memory, and so onboolean stopJRARecording()
java.lang.SecurityException
- if you haven't got the ManagementPermission monitor.void runCtrlBreakHandler(java.lang.String breakHandler)
breakHandler
- the commands to run in ctrlhandler.act syntax. If null or
empty, the local ctrlhandler.act file will be used.
java.lang.SecurityException
- if you haven't got the ManagementPermission control.java.lang.String runCtrlBreakHandlerWithResult(java.lang.String breakHandler)
breakHandler
- the commands to run in ctrlhandler.act syntax. If null or
empty, the local ctrlhandler.act file will be used.
java.lang.SecurityException
- if you haven't got the ManagementPermission control.int startMLS(int version, int port) throws java.lang.IllegalAccessException, java.lang.Exception
version
- the version of the protocol to use.port
- the port the server should listen to, or 0 to let the OS
choose
java.lang.SecurityException
- if you haven't got the ManagementPermission control.
java.lang.IllegalAccessException
- if a license related error happened.
java.lang.Exception
int[] getMLSVersions()
void shutDownMLS()
java.lang.SecurityException
- if you haven't got the ManagementPermission control.int getMLSPort()
java.lang.SecurityException
- if you haven't got the ManagementPermission control.MarkAndSweepStrategy getGarbageCollectionStrategy() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- if JRockit isn't running a MarkAndSweep collector.void setGarbageCollectionStrategy(MarkAndSweepStrategy strategy) throws java.lang.UnsupportedOperationException
strategy
- the GarbageCollectionStrategy to use. Will be ignored if the
currently used memory manager for the JavaHeap is not a
MarkAndSweep collector.
java.lang.SecurityException
- if you haven't got the ManagementPermission control.
java.lang.UnsupportedOperationException
- if JRockit isn't running with a MarkAndSweep collector.javax.management.openmbean.CompositeData getCPULoads()
NotAvailableException
- if this functionality isn't available in
this JVM.javax.management.openmbean.CompositeData getCPUDescriptions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |