Interface HealthCenter
- All Known Implementing Classes:
HealthCenterImpl
public interface HealthCenter
This class represents a connection to either a live application or data
loaded from a file. The class provdes access to all the different types of
data available within Health Center, as well as providing control functions
for limiting the amount of data that is returned.
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears any time thresholds that were set on the Health Center data.voidEnds the monitoring of the application, although the agent remains running to allow future connections.longGets the number of bytes read so far by the Health Center.Gets the classes data that is associated with this Health Center connection.Gets the CPU data that is associated with this Health Center connection.Gets the time of the first piece of monitored data.Gets the environment data that is associated with this Health Center connection.Gets the garbage collection data that is associated with this Health Center connection.Gets the I/O data that is associated with this Health Center connection.Gets the time when data was last received (variable).Gets the time of the latest piece of monitored data.Gets the locking data that is associated with this Health Center connection.Gets the method trace data that is associated with this Health Center connection.Gets the native memory data that is associated with this Health Center connection.Gets a HealthCenterPreferences object, on which preferences can be set.Gets the profiling data that is associated with this Health Center connection.Gets the threads data that is associated with this Health Center connection.Gets the VMControl object that is associated with this Health Center connection.booleanWhether the connection is currently connected.voidClears all current Health Center data.voidSaves the current Health Center data to disk.voidsetEventOnlyMode(boolean value) runs in event only mode so that no data is stored (including backing file data) This just publishes eventsvoidsetFineGrainTimeThresholds(int lowerThreshold, int upperThreshold) Sets lower and upper cut-off thresholds for the Health Center data.voidsetTimeThreshold(int lowerThreshold) Sets a lower cut-off threshold for the Health Center data.voidsetTimeThresholds(int lowerThreshold, int upperThreshold) Sets lower and upper cut-off thresholds for the Health Center data.
-
Method Details
-
setTimeThreshold
void setTimeThreshold(int lowerThreshold) Sets a lower cut-off threshold for the Health Center data. Any data from before this time is not returned on any calls that return data from Health Center.- Parameters:
lowerThreshold- the threshold, in minutes from application start.
-
setTimeThresholds
void setTimeThresholds(int lowerThreshold, int upperThreshold) Sets lower and upper cut-off thresholds for the Health Center data. Any calls that return data from the Health Center return only data that is inside this time window.- Parameters:
lowerThreshold- the lower threshold, in minutes from application start.upperThreshold- the upper threshold, in minutes from application start.
-
setFineGrainTimeThresholds
void setFineGrainTimeThresholds(int lowerThreshold, int upperThreshold) Sets lower and upper cut-off thresholds for the Health Center data. Any calls that return data from the Health Center return only data that is inside this time window.- Parameters:
lowerThreshold- the lower threshold, in milliseconds from application start.upperThreshold- the upper threshold, in milliseconds from application start.
-
clearTimeThresholds
void clearTimeThresholds()Clears any time thresholds that were set on the Health Center data. -
getIOData
IOData getIOData()Gets the I/O data that is associated with this Health Center connection.- Returns:
- an IOData object that allows access to the I/O data.
-
getClassesData
ClassesData getClassesData()Gets the classes data that is associated with this Health Center connection.- Returns:
- a ClassesData object that allows access to the classes data.
-
getCpuData
CpuData getCpuData()Gets the CPU data that is associated with this Health Center connection.- Returns:
- a CpuData object that allows access to the CPU data.
-
getGCData
GCData getGCData()Gets the garbage collection data that is associated with this Health Center connection.- Returns:
- a GCData object that allows access to the GC data.
-
getMethodTraceData
MethodTraceData getMethodTraceData()Gets the method trace data that is associated with this Health Center connection.- Returns:
- a MethodTraceData object that allows access to the method trace data.
-
getNativeMemoryData
NativeMemoryData getNativeMemoryData()Gets the native memory data that is associated with this Health Center connection.- Returns:
- a NativeMemoryData object that allows access to the native memory data.
-
getEnvironmentData
EnvironmentData getEnvironmentData()Gets the environment data that is associated with this Health Center connection.- Returns:
- an EnvironmentData object that allows access to the environment data.
-
getThreadsData
ThreadsData getThreadsData()Gets the threads data that is associated with this Health Center connection.- Returns:
- a ThreadsData object that allows access to the threads data.
-
getVMControl
VMControl getVMControl()Gets the VMControl object that is associated with this Health Center connection.- Returns:
- a VMControl object, which you can use to trigger events that operate on the monitored application. NOTE: This method only has an effect when connected to a live application.
-
getProfilingData
ProfilingData getProfilingData()Gets the profiling data that is associated with this Health Center connection.- Returns:
- a ProfilingData object that allows access to the profiling data.
-
getLockingData
LockingData getLockingData()Gets the locking data that is associated with this Health Center connection.- Returns:
- a LockingData object that allows access to the locking data.
-
getPreferences
HealthCenterPreferences getPreferences()Gets a HealthCenterPreferences object, on which preferences can be set.- Returns:
- the HealthCenterPreferences object for this Health Center connection.
-
saveData
Saves the current Health Center data to disk. Filenames have the following format:healthcenter_yyyymmddhhmm_index.hcd.- Parameters:
name- A filename or directory to save the data to. If a directory is specified, the default value ofhealthcenteris used for the filename.- Throws:
IOException- if the directory does not exist
-
resetData
void resetData()Clears all current Health Center data. -
getAmountOfDataReceived
long getAmountOfDataReceived()Gets the number of bytes read so far by the Health Center.- Returns:
- the amount of data received, in bytes.
-
isConnectionAlive
boolean isConnectionAlive()Whether the connection is currently connected. For files, this value is slightly ambiguous but will be alwaystrue, unless the file is deleted halfway through reading.- Returns:
- a boolean indicating whether the connection is alive.
-
getLastUpdated
Date getLastUpdated()Gets the time when data was last received (variable).- Returns:
- the time that the last data was received.
-
getEarliestMonitoredDataTime
Date getEarliestMonitoredDataTime()Gets the time of the first piece of monitored data.- Returns:
- the time of the first piece of monitored data.
-
getLatestMonitoredDataTime
Date getLatestMonitoredDataTime()Gets the time of the latest piece of monitored data.- Returns:
- the time of the latest piece of monitored data.
-
endMonitoring
void endMonitoring()Ends the monitoring of the application, although the agent remains running to allow future connections. -
setEventOnlyMode
void setEventOnlyMode(boolean value) runs in event only mode so that no data is stored (including backing file data) This just publishes events- Parameters:
value- true or false to turn on or off
-