All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nosqlbench.driver.jmx.ops.JMXExplainOperation Maven / Gradle / Ivy

Go to download

A JMX nosqlbench ActivityType (AT) driver module; This provides the ability to query system via JMX

There is a newer version: 4.15.102
Show newest version
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