io.nosqlbench.driver.jmx.ops.JMXExplainOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-jmx Show documentation
Show all versions of driver-jmx Show documentation
A JMX nosqlbench ActivityType (AT) driver module;
This provides the ability to query system via JMX
package io.nosqlbench.driver.jmx.ops;
import io.nosqlbench.driver.jmx.formats.MBeanInfoConsoleFormat;
import javax.management.*;
import javax.management.remote.JMXConnector;
import java.io.IOException;
public class JMXExplainOperation extends JmxOp {
public final static String EXPLAIN = "explain";
public JMXExplainOperation(JMXConnector connector, ObjectName objectName) {
super(connector,objectName);
}
@Override
public void execute() {
MBeanServerConnection bean = getMBeanConnection();
try {
MBeanInfo info = bean.getMBeanInfo(objectName);
String mbeanInfoText = MBeanInfoConsoleFormat.formatAsText(info, objectName);
System.out.println(mbeanInfoText);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy