|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProxyOperations
The operations available on the remote JVM. These are the operations that
Mission Control need which may have different implementations depending on
the underlying protocol in use.
Note that all of them can lead to IOException
if communication with
the remote JVM fails.
Field Summary | |
---|---|
static int |
JRA_DISCARD
Abort the recording process and if supported, discard the already recorded data. |
static int |
JRA_DONT_CARE
Just stop the recording in whatever way supported. |
static int |
JRA_TRUNCATE
Stop the recording but attempt to keep the data recorded so far. |
Method Summary | |
---|---|
void |
gc()
Attempts to invoke the garbage collector. |
long |
getApproximateServerTime()
Returns an approximate time of the remote JVM, compensated for network latencies. |
int |
getAvailableProcessors()
The number of available processors for the remote JVM. |
long |
getExceptionCount(java.lang.String className)
Returns the exception count for the specified class. |
long |
getInvocationCount(com.jrockit.common.util.MethodIdentifier method)
Returns the invocation count for the specified method. |
java.util.Map |
getLastRecordingParameters()
Returns the last parameters that was used when recording was started by startJRARecording(Map). |
int[] |
getMemleakProtocolVersions()
Get supported versions of the MLP protocol. |
int |
getMemleakServerPort()
Check if the server is started, will return 0 if not started, otherwise returns the port it is listening to. |
com.jrockit.common.util.MethodIdentifier[] |
getMethods(java.lang.String className)
Returns the methods available in the specified class. |
int |
getPID()
Returns the PID, or 0 if no PID could be determined. |
int[] |
getProcessAffinity()
Returns the current process affinity. |
long |
getRemoteStartTime()
Returns the start time of the remote JVM in milliseconds since January 1, 1970 UTC. |
java.util.Map |
getSupportedParameters()
Returns supported parameters(parameters that can be modified by the user) For R26.4 and 1.4 this is faked by the proxy layer. |
long[] |
getThreadAllocatedBytes(long[] threadIds)
Returns the allocated bytes for given thread IDs. |
long[] |
getThreadCpuTime(long[] threadIds)
Returns the used CPU time for given thread IDs. |
java.lang.String |
getThreadStackDump()
Dumps all threads stacks and returns them as a long String . |
double |
getTicksPerSecond()
Returns the number of ticks that a second represents on the monitored JVM. |
long |
getTiming(com.jrockit.common.util.MethodIdentifier method)
Returns the invocation count for the specified method. |
long |
getUptime()
Returns the time the remote JVM has been running in milliseconds. |
java.lang.String |
getVersionString()
Returns the version string of the JVM, or null if unknown. |
boolean |
isExitOnOutOfMemory()
Returns true if hard exit on out of memory is enabled, false otherwise. |
boolean |
isHeapSizeLocked()
Returns true if the heap size has been locked, false otherwise. |
boolean |
isInvocationCountEnabled(com.jrockit.common.util.MethodIdentifier method)
Checks if invocation counting is enabled for the specified method. |
boolean |
isThrowable(java.lang.String className)
Checks if the named class is a Throwable on the server. |
boolean |
isTimingEnabled(com.jrockit.common.util.MethodIdentifier method)
Checks if timing profiling is enabled for the specified method. |
byte[] |
readJRARecording()
Reads a completed JRA recording from the JVM. |
void |
runCtrlBreakHandler(java.lang.String arg)
Runs the specified diagnostic command. |
java.lang.String |
runCtrlBreakHandlerWithResult(java.lang.String arg)
Runs the specified diagnostic command. |
void |
setAllocatedHeapSize(long suggestedHeapSize)
Suggest that the JVM should set a new heap size. |
void |
setExceptionCountEnabled(java.lang.String className,
boolean enabled,
boolean includeSubclasses)
Enables the exception counting for the named class. |
void |
setExitOnOutOfMemory(boolean enable)
Enables or disables hard exit on out of memory conditions. |
void |
setHeapSizeLocked(boolean val)
Enables or disables heap size locking. |
void |
setInvocationCountEnabled(com.jrockit.common.util.MethodIdentifier method,
boolean enable)
Enables method invocation counting profiling for the specified method. |
void |
setProcessAffinity(int[] bitMask)
Sets the process CPU affinity, i.e. changes the set of CPUs available for the JVM to execute on. |
void |
setTimingEnabled(com.jrockit.common.util.MethodIdentifier method,
boolean enable)
Enables method timing profiling for the specified method. |
void |
shutDownMemleakServer()
Shuts down the memleak server. |
boolean |
startJRARecording(java.util.Map map)
Starts a JRA recording. |
int |
startMemleakServer(int[] versions,
int port)
Start the memleak server using the first of the given protocol versions that is supported by the server. |
int |
startMemleakServer(int version,
int port)
Starts the memleak server. |
boolean |
stopJRARecording(int intent)
Stop the JRA recording process and handle the already recorded data according to intent . |
Field Detail |
---|
static final int JRA_DONT_CARE
static final int JRA_TRUNCATE
static final int JRA_DISCARD
Method Detail |
---|
long getRemoteStartTime() throws java.io.IOException
System.currentTimeMillis()
would
it have been called the moment the remote JVM started.
java.io.IOException
- if communication with the remote JVM fails.double getTicksPerSecond() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the operation is not
available.
java.lang.UnsupportedOperationException
long getApproximateServerTime()
long getUptime() throws java.io.IOException
java.io.IOException
- if communication with the remote JVM fails.int getAvailableProcessors() throws java.io.IOException
java.io.IOException
- if communication with the remote JVM fails.java.lang.String getThreadStackDump() throws java.io.IOException, java.lang.UnsupportedOperationException
String
.
String
containing the threads stacks.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void gc() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void setExceptionCountEnabled(java.lang.String className, boolean enabled, boolean includeSubclasses) throws java.lang.ClassNotFoundException, java.io.IOException, java.lang.UnsupportedOperationException
className
- the name of the (Exception) class for which to enable
exception counting.enabled
- true to enable, false to disable.includeSubclasses
- true to include subclasses of the named class.
java.lang.ClassNotFoundException
- if the class could not be found.
{@link
- UnsupportedOperationException} if the operation is not
available.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
long getExceptionCount(java.lang.String className) throws ProfilingOperationException, java.io.IOException, java.lang.UnsupportedOperationException
className
- the name of the class to poll.
ProfilingOperationException
- if not applicable for the JVM implementation connected to.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean isTimingEnabled(com.jrockit.common.util.MethodIdentifier method) throws ProfilingOperationException, java.lang.reflect.UndeclaredThrowableException, java.io.IOException, java.lang.UnsupportedOperationException
method
- the method to check.
ProfilingOperationException
- if not applicable for the JVM implementation connected to.
java.lang.reflect.UndeclaredThrowableException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean isInvocationCountEnabled(com.jrockit.common.util.MethodIdentifier method) throws ProfilingOperationException, java.io.IOException
method
- the method to check.
ProfilingOperationException
- if not applicable for the JVM implementation connected to.
java.io.IOException
- if communication with the remote JVM fails.void setInvocationCountEnabled(com.jrockit.common.util.MethodIdentifier method, boolean enable) throws ProfilingOperationException, java.io.IOException, java.lang.UnsupportedOperationException
method
- the method for which to enable invocation counting profiling.enable
- true to enable, false to disable.
ProfilingOperationException
- if not applicable for the JVM implementation connected to.
{@link
- UnsupportedOperationException} if the operation is not
available.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
void setTimingEnabled(com.jrockit.common.util.MethodIdentifier method, boolean enable) throws ProfilingOperationException, java.lang.UnsupportedOperationException, java.io.IOException
method
- the method for which to enable method timing profiling.enable
- true
to enable method timing.
ProfilingOperationException
- if not applicable for the JVM implementation connected to.
java.lang.UnsupportedOperationException
- if the operation isn't supported by the JVM.
java.io.IOException
- if communication with the remote JVM fails.long getInvocationCount(com.jrockit.common.util.MethodIdentifier method) throws java.io.IOException, java.lang.UnsupportedOperationException
method
- the method to check.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
long getTiming(com.jrockit.common.util.MethodIdentifier method) throws java.io.IOException, java.lang.UnsupportedOperationException
method
- the method to check.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean isExitOnOutOfMemory() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean isHeapSizeLocked() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void setHeapSizeLocked(boolean val) throws java.io.IOException, java.lang.UnsupportedOperationException
val
- true locks the heap size to the current size, false disables
heap size locking.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void setExitOnOutOfMemory(boolean enable) throws java.io.IOException, java.lang.UnsupportedOperationException
enable
- true enables hard exit on out of memory conditions, false
disables hard exit.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void setAllocatedHeapSize(long suggestedHeapSize) throws java.io.IOException, java.lang.UnsupportedOperationException
suggestedHeapSize
- the heap size to suggest. The JVM will do it's best to set the
heap size accordingly, but may fail due to memory constraints,
aligning issues or other problems.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
int[] getProcessAffinity() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
- if the operation is not supported by the underlying platform.void setProcessAffinity(int[] bitMask) throws java.io.IOException, java.lang.UnsupportedOperationException
bitMask
- the CPU affinity mask.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
- if the operation is not supported by the underlying platform.getProcessAffinity()
boolean isThrowable(java.lang.String className) throws java.io.IOException, java.lang.UnsupportedOperationException
Throwable
on the server.
className
- the name of the class to check.
Throwable
.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
com.jrockit.common.util.MethodIdentifier[] getMethods(java.lang.String className) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.UnsupportedOperationException
className
- the name of the class for which to return the available
methods.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.ClassNotFoundException
- if the class could not be found.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
void runCtrlBreakHandler(java.lang.String arg) throws java.io.IOException, java.lang.UnsupportedOperationException
arg
- the diagnostic command and the relevant arguments, in jrcmd
format.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
java.lang.String runCtrlBreakHandlerWithResult(java.lang.String arg) throws java.io.IOException, java.lang.UnsupportedOperationException
arg
- the diagnostic command and the relevant arguments, in jrcmd
format.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
byte[] readJRARecording() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean startJRARecording(java.util.Map map) throws java.io.IOException, LicenseException, java.lang.UnsupportedOperationException
map
- a map with options.
java.io.IOException
- if communication with the remote JVM fails.
LicenseException
- can be thrown by pre R27.6 JRockits without valid licenses.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
boolean stopJRARecording(int intent) throws java.io.IOException, java.lang.UnsupportedOperationException
intent
.
intent
- how the stopping should be done. One of the constants
JRA_DONT_CARE
, JRA_TRUNCATE
or
JRA_DISCARD
.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
java.util.Map getSupportedParameters() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
java.util.Map getLastRecordingParameters() throws java.io.IOException, java.lang.UnsupportedOperationException
Map
, if no recording exists null
is returned.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
int startMemleakServer(int[] versions, int port) throws java.io.IOException, LicenseException, MemleakStartupException
versions
- the acceptable protocol versions to use, most preferred first.port
- the port the server should listen to, or 0 to let the OS
choose.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException}
if the information is not available.
{@link
- MemleakStartupException}
if the server couldn't be started.
LicenseException
MemleakStartupException
int startMemleakServer(int version, int port) throws java.io.IOException, LicenseException, MemleakStartupException, java.lang.UnsupportedOperationException
version
- the protocol version to use.port
- the port the server should listen to, or 0 to let the OS
choose.
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException}
if the information is not available.
{@link
- MemleakStartupException}
if the server couldn't be started.
LicenseException
MemleakStartupException
java.lang.UnsupportedOperationException
void shutDownMemleakServer() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
int getMemleakServerPort() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
int[] getMemleakProtocolVersions() throws java.io.IOException, java.lang.UnsupportedOperationException
java.io.IOException
- if communication with the remote JVM fails.
{@link
- UnsupportedOperationException} if the information is not
available.
java.lang.UnsupportedOperationException
java.lang.String getVersionString()
int getPID()
long[] getThreadCpuTime(long[] threadIds) throws java.io.IOException, java.lang.UnsupportedOperationException
threadIds
- the thread IDs to retrieve CPU time for.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
- if the information is not available.long[] getThreadAllocatedBytes(long[] threadIds) throws java.io.IOException, java.lang.UnsupportedOperationException
threadIds
- the thread IDs to retrieve allocated bytes for.
java.io.IOException
- if communication with the remote JVM fails.
java.lang.UnsupportedOperationException
- if the information is not available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |