Java Code Examples for sun.management.snmp.jvmmib.EnumJvmThreadCpuTimeMonitoring#intValue()

The following examples show how to use sun.management.snmp.jvmmib.EnumJvmThreadCpuTimeMonitoring#intValue() . 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 jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 2
Source File: JvmThreadingImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 3
Source File: JvmThreadingImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 4
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 5
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 6
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 7
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 8
Source File: JvmThreadingImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 9
Source File: JvmThreadingImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 10
Source File: JvmThreadingImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 11
Source File: JvmThreadingImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 12
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 13
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 14
Source File: JvmThreadingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 15
Source File: JvmThreadingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 16
Source File: JvmThreadingImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 17
Source File: JvmThreadingImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 18
Source File: JvmThreadingImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

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

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 19
Source File: JvmThreadingImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    // We can trust the received value, it has been checked in
    // checkJvmThreadCpuTimeMonitoring
    if(JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue())
        mbean.setThreadCpuTimeEnabled(true);
    else
        mbean.setThreadCpuTimeEnabled(false);
}
 
Example 20
Source File: JvmThreadingImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Setter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void setJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring x)
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

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