Package org.rioproject.impl.watch

Examples of org.rioproject.impl.watch.ThresholdWatch


            Method getThreadDeadlockCalculable = ThreadDeadlockMonitor.class.getMethod("getThreadDeadlockCalculable");
            ThreadDeadlockMonitor threadDeadlockMonitor = new ThreadDeadlockMonitor();
            threadDeadlockMonitor.setThreadMXBean(ManagementFactory.getThreadMXBean());

            WatchInjector watchInjector = new WatchInjector(this, context);
            ThresholdWatch watch = (ThresholdWatch)watchInjector.inject(threadDeadlockDescriptor,
                                                                        threadDeadlockMonitor,
                                                                        getThreadDeadlockCalculable);
            watch.setThresholdValues(new ThresholdValues(0, 1));
            watch.addThresholdListener(new DeadlockedThreadPolicyHandler());
        } else {
            logger.info("Thread deadlock monitoring has been disabled. The " +
                        "configured thread deadlock check time was " +
                        "[{}]. To enable thread deadlock monitoring, the thread deadlock check " +
                        "time must be >= 1000 milliseconds.", threadDeadlockCheck);
View Full Code Here

TOP

Related Classes of org.rioproject.impl.watch.ThresholdWatch

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.