sun.management.snmp.jvmmib.EnumJvmThreadContentionMonitoring Java Examples

The following examples show how to use sun.management.snmp.jvmmib.EnumJvmThreadContentionMonitoring. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JvmThreadingImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #2
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #3
Source File: JvmThreadingImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #4
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #5
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #6
Source File: JvmThreadingImpl.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #7
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #8
Source File: JvmThreadingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #9
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #10
Source File: JvmThreadingImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #11
Source File: JvmThreadingImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #12
Source File: JvmThreadingImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadContentionMonitoring" variable.
 */
public EnumJvmThreadContentionMonitoring getJvmThreadContentionMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadContentionMonitoringSupported()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Unsupported ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringUnsupported;
    }

    if(mbean.isThreadContentionMonitoringEnabled()) {
        log.debug("getJvmThreadContentionMonitoring",
                  "Enabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringEnabled;
    } else {
        log.debug("getJvmThreadContentionMonitoring",
                  "Disabled ThreadContentionMonitoring");
        return JvmThreadContentionMonitoringDisabled;
    }
}
 
Example #13
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #14
Source File: JvmThreadingImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #15
Source File: JvmThreadingImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #16
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #17
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #18
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #19
Source File: JvmThreadingImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #20
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #21
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #22
Source File: JvmThreadingImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #23
Source File: JvmThreadingImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #24
Source File: JvmThreadingImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #25
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #26
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #27
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #28
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}
 
Example #29
Source File: JvmThreadingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadContentionMonitoring" variable.
 */
public void checkJvmThreadContentionMonitoring(
                          EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    //Can't be set externaly to unsupported state.
    if(JvmThreadContentionMonitoringUnsupported.intValue()==x.intValue()) {
        log.debug("checkJvmThreadContentionMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadContentionMonitoringEnabled.intValue()==x.intValue()) ||
        (JvmThreadContentionMonitoringDisabled.intValue()==x.intValue())) {

        // The value is valid, but is the feature supported ?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadContentionMonitoringSupported()) return;

        log.debug("checkJvmThreadContentionMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    log.debug("checkJvmThreadContentionMonitoring",
              "Try to set to unknown value");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example #30
Source File: JvmThreadingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadContentionMonitoring" variable.
 */
public void setJvmThreadContentionMonitoring(
                        EnumJvmThreadContentionMonitoring x)
    throws SnmpStatusException {
    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadContentionMonitoring
    if(JvmThreadContentionMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadContentionMonitoringEnabled(true);
    else
        mbean.setThreadContentionMonitoringEnabled(false);
}