Package org.rioproject.impl.system.measurable

Examples of org.rioproject.impl.system.measurable.MeasurableMonitor


                                            1,   /* default */
                                            1,   /* min */
                                            10); /* max */
            setSampleSize(sampleSize);

            MeasurableMonitor defaultMonitor;
            if(monitorJVM) {
                ProcessCPUHandler cpuHandler = new ProcessCPUHandler();
                cpuHandler.setMXBean(ManagementFactory.getOperatingSystemMXBean());
                cpuHandler.setStartTime(ManagementFactory.getRuntimeMXBean().getStartTime());
                defaultMonitor = cpuHandler;
            } else {
                SystemCPUHandler cpuHandler = new SystemCPUHandler();
                cpuHandler.setID(id);
                cpuHandler.setThresholdValues(tVals);
                defaultMonitor = cpuHandler;
            }

            MeasurableMonitor monitor =
                (MeasurableMonitor)config.getEntry(configComponent,
                                                   "cpuMonitor",
                                                   MeasurableMonitor.class,
                                                   defaultMonitor);
            long reportRate = Config.getLongEntry(config,
View Full Code Here


    protected String getComponentName() {
        return COMPONENT;
    }

    protected MeasurableMonitor createMeasurableMonitor(Configuration config) throws ConfigurationException {
        MeasurableMonitor mMon = (MeasurableMonitor)config.getEntry(getComponentName(),
                                                                    "monitor",
                                                                    MeasurableMonitor.class,
                                                                    new ProcessMemoryMonitor());
        if(mMon instanceof ProcessMemoryMonitor) {
            NotificationEmitter emitter = (NotificationEmitter)((ProcessMemoryMonitor)mMon).getMXBean();
View Full Code Here

                                            1,   /* min */
                                            10); /* max */
            setSampleSize(sampleSize);
            DiskSpaceMonitor defaultMonitor = new DiskSpaceMonitor();

            MeasurableMonitor monitor =
                (MeasurableMonitor)config.getEntry(COMPONENT,
                                                   "diskMonitor",
                                                   MeasurableMonitor.class,
                                                   defaultMonitor);

View Full Code Here

TOP

Related Classes of org.rioproject.impl.system.measurable.MeasurableMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.