org.snmp4j.Snmp.getCounterSupport()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.snmp4j.Snmp.getCounterSupport()方法的一些代码示例,展示了Snmp.getCounterSupport()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Snmp.getCounterSupport()方法的具体详情如下:
包路径:org.snmp4j.Snmp
类名称:Snmp
方法名:getCounterSupport

Snmp.getCounterSupport介绍

[英]Gets the counter support for Snmp related counters. These are for example: snmp4jStatsRequestTimeouts, snmp4jStatsRequestTimeouts, snmp4jStatsRequestWaitTime
[中]获取Snmp相关计数器的计数器支持。例如:snmp4jstatsrequesttimeout、snmp4jstatsrequesttimeout、snmp4jStatsRequestWaitTime

代码示例

代码示例来源:origin: org.snmp4j/snmp4j

public void responseReceived() {
  this.responseReceived = true;
  if (waitTime != null) {
    CounterSupport counterSupport = getCounterSupport();
    if (counterSupport != null) {
      long increment = (System.nanoTime() - waitTime.getIncrement()) / SnmpConstants.MILLISECOND_TO_NANOSECOND;
      waitTime.setIncrement(increment);
      counterSupport.fireIncrementCounter(waitTime);
      if (waitTimeTarget != null) {
        waitTimeTarget.setIncrement(increment);
        counterSupport.fireIncrementCounter(waitTimeTarget);
      }
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

public void responseReceived() {
 this.responseReceived = true;
 if (waitTime != null) {
  CounterSupport counterSupport = getCounterSupport();
  if (counterSupport != null) {
   long increment = (System.nanoTime()-waitTime.getIncrement())/SnmpConstants.MILLISECOND_TO_NANOSECOND;
   waitTime.setIncrement(increment);
   counterSupport.fireIncrementCounter(waitTime);
   if (waitTimeTarget != null) {
    waitTimeTarget.setIncrement(increment);
    counterSupport.fireIncrementCounter(waitTimeTarget);
   }
  }
 }
}

代码示例来源:origin: org.snmp4j/snmp4j

Target m_target = target;
if (waitTime != null && !isResponseReceived()) {
  CounterSupport counterSupport = getCounterSupport();
  if (counterSupport != null) {
    counterSupport.fireIncrementCounter(

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

Target m_target = target;
if (waitTime != null && !isResponseReceived()) {
 CounterSupport counterSupport = getCounterSupport();
 if (counterSupport != null) {
  counterSupport.fireIncrementCounter(

代码示例来源:origin: org.snmp4j/snmp4j

this.pendingRetry = false;
if (waitTime != null) {
  CounterSupport counterSupport = getCounterSupport();
  if (counterSupport != null) {
    counterSupport.fireIncrementCounter(

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

this.pendingRetry = false;
if (waitTime != null) {
 CounterSupport counterSupport = getCounterSupport();
 if (counterSupport != null) {
  counterSupport.fireIncrementCounter(

相关文章