com.bea.jvm
Interface ProfilingSystem

All Superinterfaces:
Describable, JVMComponent

public interface ProfilingSystem
extends JVMComponent

Interface for retrieving profiling information from JRockit.

Author:
Calle Wilund, Marcus Hirt

Method Summary
 long getExceptionCount(java.lang.Class throwableClass)
          Deprecated. Use ProfileEntries instead
 long getInvocationCount(java.lang.reflect.Constructor constructor)
          Deprecated. Use ProfileEntries instead
 long getInvocationCount(java.lang.reflect.Method method)
          Deprecated. Use ProfileEntries instead
 long getTiming(java.lang.reflect.Constructor constructor)
          Deprecated. Use ProfileEntries instead
 long getTiming(java.lang.reflect.Method method)
          Deprecated. Use ProfileEntries instead
 boolean isExceptionCountEnabled(java.lang.Class throwableClass)
          Deprecated. Use ProfileEntries instead
 boolean isInvocationCountEnabled(java.lang.reflect.Constructor constructor)
          Deprecated. Use ProfileEntries instead
 boolean isInvocationCountEnabled(java.lang.reflect.Method method)
          Deprecated. Use ProfileEntries instead
 boolean isTimingEnabled(java.lang.reflect.Constructor constructor)
          Deprecated. Use ProfileEntries instead
 boolean isTimingEnabled(java.lang.reflect.Method method)
          Deprecated. Use ProfileEntries instead
 ConstructorProfileEntry newConstructorProfileEntry(java.lang.reflect.Constructor constructor)
           
 ExceptionProfileEntry newExceptionProfileEntry(java.lang.Class throwAbleClass)
           
 MethodProfileEntry newMethodProfileEntry(java.lang.reflect.Method method)
           
 void setExceptionCountEnabled(java.lang.Class throwableClass, boolean enable, boolean includeAllSubclasses)
          Deprecated. Use ProfileEntries instead
 void setInvocationCountEnabled(java.lang.reflect.Constructor constructor, boolean enable)
          Deprecated. Use ProfileEntries instead
 void setInvocationCountEnabled(java.lang.reflect.Method method, boolean enable)
          Deprecated. Use ProfileEntries instead
 void setTimingEnabled(java.lang.reflect.Constructor constructor, boolean enable)
          Deprecated. Use ProfileEntries instead
 void setTimingEnabled(java.lang.reflect.Method method, boolean enable)
          Deprecated. Use ProfileEntries instead
 
Methods inherited from interface com.bea.jvm.JVMComponent
getJVM
 
Methods inherited from interface com.bea.jvm.Describable
getDescription
 

Method Detail

setInvocationCountEnabled

void setInvocationCountEnabled(java.lang.reflect.Method method,
                               boolean enable)
                               throws NotAvailableException,
                                      UnapplicableMethodException
Deprecated. Use ProfileEntries instead

Enables or disables invocation counting for the specified method depending on the enable argument. If invocation counting is disabled, the count is reset to zero. When enabling an already enabled method, the count is reset to zero.

Parameters:
method - the method we wish to enable or disble invocation counting for. If the method is null, a NullPointerException will be thrown.
enable - true to enable, false to disable.
Throws:
UnapplicableMethodException - if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

setInvocationCountEnabled

void setInvocationCountEnabled(java.lang.reflect.Constructor constructor,
                               boolean enable)
                               throws NotAvailableException,
                                      UnapplicableMethodException
Deprecated. Use ProfileEntries instead

Enables or disables invocation counting for the specified constructor depending on the enable argument. If invocation counting is disabled, the count is reset to zero. When enabling an already enabled constructor, the count is reset to zero.

Parameters:
constructor - the method we wish to enable or disble invocation counting for. If the constructor is null, a NullPointerException will be thrown.
enable - true to enable, false to disable.
Throws:
NotAvailableException - if this functionality isn't available in this JVM.
UnapplicableMethodException

isInvocationCountEnabled

boolean isInvocationCountEnabled(java.lang.reflect.Method method)
Deprecated. Use ProfileEntries instead

Returns true if invocation counting is enabled for the specified method. If the method is null, a NullPointerException will be thrown.

Parameters:
method - the method we wish to check. If the method is null, a NullPointerException will be thrown.
Returns:
boolean true if invocation counting is enabled for the method.
Throws:
UnapplicableMethodException - if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

isInvocationCountEnabled

boolean isInvocationCountEnabled(java.lang.reflect.Constructor constructor)
Deprecated. Use ProfileEntries instead

Returns true if invocation counting is enabled for the specified constructor.

Parameters:
constructor - the method we wish to check. If the constructor is null, a NullPointerException will be thrown.
Returns:
boolean true if invocation counting is enabled for the method.
Throws:
NotAvailableException - if this functionality isn't available in this JVM.

getInvocationCount

long getInvocationCount(java.lang.reflect.Method method)
Deprecated. Use ProfileEntries instead

Returns the invocation count since enabling invocation counting for the for the specified method.

Parameters:
method - the method for which to return the invocation count. If the method is null, a NullPointerException will be thrown.
Returns:
the invocaton count for the specified Method.
Throws:
UnapplicableMethodException - if invocation counting hasn't been enabled for the method in question, or if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

getInvocationCount

long getInvocationCount(java.lang.reflect.Constructor constructor)
Deprecated. Use ProfileEntries instead

Returns the invocation count since enabling invocation counting for the for the specified constructor.

Parameters:
constructor - the method for which to return the invocation count. If the constructor is null, a NullPointerException will be thrown.
Returns:
the invocation count for thge specified Constructor.
Throws:
UnapplicableMethodException - if invocation counting hasn't been enabled for the constructor in question.
NotAvailableException - if this functionality isn't available in this JVM.

setTimingEnabled

void setTimingEnabled(java.lang.reflect.Method method,
                      boolean enable)
                      throws NotAvailableException,
                             UnapplicableMethodException
Deprecated. Use ProfileEntries instead

Enables or disables timing (that is, measure time spent in) depending on the enable argument. If invocation counting is disabled, the timing is reset to zero. If enabling timing for a method that already is enabled, the timing is reset to zero.

Parameters:
method - the method to enable/disable timing for. If the method is null, a NullPointerException will be thrown.
enable - true to enable, false to disable.
Throws:
UnapplicableMethodException - if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

setTimingEnabled

void setTimingEnabled(java.lang.reflect.Constructor constructor,
                      boolean enable)
                      throws NotAvailableException,
                             UnapplicableMethodException
Deprecated. Use ProfileEntries instead

Enables or disables timing (that is, measure time spent in) depending on the enable argument. If invocation counting is disabled, the timing is reset to zero. If enabling timing for a constructor that already is enabled, the timing is reset to zero.

Parameters:
constructor - the method to enable/disable timing for. If the constructor is null, a NullPointerException will be thrown.
enable - true to enable, false to disable.
Throws:
NotAvailableException - if this functionality isn't available in this JVM.
UnapplicableMethodException

isTimingEnabled

boolean isTimingEnabled(java.lang.reflect.Method method)
Deprecated. Use ProfileEntries instead

Checks whether timing is enabled or not for a certain method.

Parameters:
method - the method for which check if timing is enabled. If the method is null, a NullPointerException will be thrown.
Returns:
true if timing is enabled for the method, false otherwise.
Throws:
UnapplicableMethodException - if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

isTimingEnabled

boolean isTimingEnabled(java.lang.reflect.Constructor constructor)
Deprecated. Use ProfileEntries instead

Checks whether timing is enabled or not for the specified constructor.

Parameters:
constructor - the constructor for which to retrieve the timing. If the constructor is null, a NullPointerException will be thrown.
Returns:
true if timing is enabled for the method, false otherwise.
Throws:
NotAvailableException - if this functionality isn't available in this JVM.

getTiming

long getTiming(java.lang.reflect.Method method)
               throws NotAvailableException
Deprecated. Use ProfileEntries instead

Returns the amount of time spent performing work in the method, since enabling timing (in miliseconds).

Parameters:
method - the method to return timing information about. If the method is null, a NullPointerException will be thrown.
Returns:
the amount of time spent in the method in ms.
Throws:
UnapplicableMethodException - if timing hasn't been enabled for the method, or if the method is native or abstract.
NotAvailableException - if this functionality isn't available in this JVM.

getTiming

long getTiming(java.lang.reflect.Constructor constructor)
               throws NotAvailableException
Deprecated. Use ProfileEntries instead

Returns the amount of time spent performing work in the constructor since enabling timing (in miliseconds).

Parameters:
constructor - the constructor to return timing information about. If the constructor is null, a NullPointerException will be thrown.
Returns:
the amount of time spent in the cnostructor in ms.
Throws:
NotAvailableException - if this functionality isn't available in this JVM.

setExceptionCountEnabled

void setExceptionCountEnabled(java.lang.Class throwableClass,
                              boolean enable,
                              boolean includeAllSubclasses)
                              throws java.lang.ClassCastException
Deprecated. Use ProfileEntries instead

Enables or disables exception counting for a certain class of exceptions.

Parameters:
throwableClass - the exception class to enable/disable counting for. If the throwableClass is null, a NullPointerException will be thrown.
enable - true to enable, false to disable.
includeAllSubclasses - indicates whether subclasses to throwableClass will also contribute to the count.
Throws:
java.lang.ClassCastException - the argument throwableClass is not a subclass of Throwable.

getExceptionCount

long getExceptionCount(java.lang.Class throwableClass)
                       throws java.lang.ClassCastException
Deprecated. Use ProfileEntries instead

Returns the current exception count for the specified type. If exception count has not been enabled for the specified type, the result is unspecified. If the throwableClass is null, a NullPointerException will be thrown.

Parameters:
throwableClass - the exception class to get the counter for. If the throwableClass is null, a NullPointerException will be thrown.
Returns:
the current number of exceptions of this type thrown.
Throws:
java.lang.ClassCastException - if the argument is not a subclass of Throwable.

isExceptionCountEnabled

boolean isExceptionCountEnabled(java.lang.Class throwableClass)
                                throws java.lang.ClassCastException
Deprecated. Use ProfileEntries instead

Returns whether exception counting for the Throwable is enabled or not.

Parameters:
throwableClass - the exception class to get the counter for. If the throwableClass is null, a NullPointerException will be thrown.
Returns:
true if exception counting is enabled for the argument, false otherwise.
Throws:
java.lang.ClassCastException - if the argument is not a subclass of Throwable

newMethodProfileEntry

MethodProfileEntry newMethodProfileEntry(java.lang.reflect.Method method)
                                         throws NotAvailableException,
                                                UnapplicableMethodException
Returns:
A MethodProfileEntry for performance monitoring of this Method
Throws:
NotAvailableException - If the implementation does not support method profiling
UnapplicableMethodException - If this is a native or abstract Method

newConstructorProfileEntry

ConstructorProfileEntry newConstructorProfileEntry(java.lang.reflect.Constructor constructor)
                                                   throws NotAvailableException
Returns:
A MethodProfileEntry for performance monitoring of this Constructor
Throws:
NotAvailableException - If the implementation does not support method profiling

newExceptionProfileEntry

ExceptionProfileEntry newExceptionProfileEntry(java.lang.Class throwAbleClass)
                                               throws NotAvailableException,
                                                      java.lang.IllegalArgumentException
Returns:
A ExceptionProfileEntry for measuring exception count for given type
Throws:
NotAvailableException - If the implementation does not support exception profiling
java.lang.IllegalArgumentException - If the class is not a java.lang.Throwable


Copyright © 2006 BEA Systems Inc.