Package com.sun.solaris.domain.pools
Interface Monitor
-
public interface Monitor
A monitoring class. The user of this interface can retrieve monitoring information related to the configuration which is examined.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.sun.solaris.domain.pools.ResourceMonitor
get(Resource res)
void
getNext()
Return the next sample.int
getSampleCount()
Return the number of samples taken.double
getUtilization(Resource res)
Return the utilization for supplied resource.void
initialize(Configuration conf)
Initialize the monitoring object using details from the supplied configuration.boolean
isValid()
-
-
-
Method Detail
-
initialize
void initialize(Configuration conf) throws PoolsException, com.sun.solaris.domain.pools.StaleMonitorException
Initialize the monitoring object using details from the supplied configuration.- Parameters:
conf
- The configuration to be monitored.- Throws:
PoolsException
- If the initialize fails.com.sun.solaris.domain.pools.StaleMonitorException
- If the resource monitors cannot be accessed.
-
getNext
void getNext() throws com.sun.solaris.domain.pools.StaleMonitorException, PoolsException, java.lang.InterruptedException
Return the next sample. This call is a blocking call. The sample will only be returned after pausing the invoking thread for the "sample interval".- Throws:
com.sun.solaris.domain.pools.StaleMonitorException
- If the sample fails.PoolsException
- If there is an error manipulating the pools configuration.java.lang.InterruptedException
- If the thread is interrupted while waiting for the sampling time to arrive. The caller may wish to check other conditions before possibly reinitiating the sample.
-
getSampleCount
int getSampleCount()
Return the number of samples taken. This is the number of successful calls togetNext()
.
-
getUtilization
double getUtilization(Resource res) throws com.sun.solaris.domain.pools.StaleMonitorException
Return the utilization for supplied resource.- Parameters:
res
- The resource to be examined.- Throws:
com.sun.solaris.domain.pools.StaleMonitorException
- if the resource cannot be accessed.
-
isValid
boolean isValid()
-
get
com.sun.solaris.domain.pools.ResourceMonitor get(Resource res) throws com.sun.solaris.domain.pools.StaleMonitorException
- Throws:
com.sun.solaris.domain.pools.StaleMonitorException
-
-