本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBasedCounter32.<init>()
方法的一些代码示例,展示了ZeroBasedCounter32.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroBasedCounter32.<init>()
方法的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBasedCounter32
类名称:ZeroBasedCounter32
方法名:<init>
[英]Creates a new instance from Counter32
[中]从Counter32创建一个新实例
代码示例来源:origin: org.opendaylight.mdsal.model/ietf-yang-types-20130715
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) {
return new ZeroBasedCounter32(java.lang.Long.valueOf(defaultValue));
}
代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-yang-types
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) {
return new ZeroBasedCounter32(Long.valueOf(defaultValue));
}
代码示例来源:origin: org.opendaylight.yangtools.model/ietf-yang-types-20130715
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) {
return new ZeroBasedCounter32(Long.valueOf(defaultValue));
}
代码示例来源:origin: org.opendaylight.coretutorials/openconfig-bgp
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) {
return new ZeroBasedCounter32(Long.valueOf(defaultValue));
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private static Received newReceivedInstance() {
final Received recv = new Received();
recv.setCount(new ZeroBasedCounter32(0L));
return recv;
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private static Sent newSentInstance() {
final Sent sent = new Sent();
sent.setCount(new ZeroBasedCounter32(0L));
return sent;
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
public ZeroBasedCounter32 getCountAsZeroBasedCounter32() {
return new ZeroBasedCounter32(safetyCheck(getCount()));
}
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private static void updateSentMsg(final Sent sent) {
Preconditions.checkNotNull(sent);
final long count = sent.getCount() == null ? 0L : sent.getCount().getValue();
sent.setCount(new ZeroBasedCounter32(count + 1));
sent.setTimestamp(new Timestamp(StatisticsUtil.getCurrentTimestampInSeconds()));
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private static void updateReceivedMsg(final Received received) {
Preconditions.checkNotNull(received);
final long count = received.getCount() == null ? 0L : received.getCount().getValue();
received.setCount(new ZeroBasedCounter32(count + 1));
received.setTimestamp(new Timestamp(StatisticsUtil.getCurrentTimestampInSeconds()));
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private void updateSentMsgErr(@Nonnull final Notify error) {
Preconditions.checkNotNull(error);
final List<ErrorSent> errList = this.errMsgs.getErrorSent();
ErrorSent sent = null;
for (ErrorSent err : errList) {
if (err.getErrorCode().equals(error.getErrorCode()) && err.getErrorSubcode().equals(error.getErrorSubcode())) {
sent = err;
break;
}
}
if (null == sent) {
sent = new ErrorSent();
sent.setErrorCode(error.getErrorCode());
sent.setErrorSubcode(error.getErrorSubcode());
sent.setCount(new ZeroBasedCounter32(0L));
errList.add(sent);
}
sent.setCount(new ZeroBasedCounter32(sent.getCount().getValue() + 1));
final Timestamp curTimestamp = new Timestamp(StatisticsUtil.getCurrentTimestampInSeconds());
sent.setTimestamp(curTimestamp);
this.errMsgsSentTotal.setCount(new ZeroBasedCounter32(this.errMsgsSentTotal.getCount().getValue() + 1));
this.errMsgsSentTotal.setTimestamp(curTimestamp);
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private void initMsgs() {
this.totalMsgs.setReceived(newReceivedInstance());
this.totalMsgs.setSent(newSentInstance());
this.kaMsgs.setReceived(newReceivedInstance());
this.kaMsgs.setSent(newSentInstance());
this.updMsgs.setReceived(newReceivedInstance());
this.updMsgs.setSent(newSentInstance());
this.rrMsgs.setReceived(newReceivedInstance());
this.rrMsgs.setSent(newSentInstance());
this.errMsgsSentTotal.setCount(new ZeroBasedCounter32(0L));
this.errMsgsRecvTotal.setCount(new ZeroBasedCounter32(0L));
this.errMsgs.getErrorSent().clear();
this.errMsgs.getErrorReceived().clear();
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-rib-impl
private void updateReceivedMsgErr(@Nonnull final Notify error) {
Preconditions.checkNotNull(error);
final List<ErrorReceived> errList = this.errMsgs.getErrorReceived();
ErrorReceived received = null;
for (ErrorReceived err : errList) {
if (err.getErrorCode().equals(error.getErrorCode()) && err.getErrorSubcode().equals(error.getErrorSubcode())) {
received = err;
break;
}
}
if (null == received) {
received = new ErrorReceived();
received.setErrorCode(error.getErrorCode());
received.setErrorSubcode(error.getErrorSubcode());
received.setCount(new ZeroBasedCounter32(0L));
errList.add(received);
}
received.setCount(new ZeroBasedCounter32(received.getCount().getValue() + 1));
final Timestamp curTimestamp = new Timestamp(StatisticsUtil.getCurrentTimestampInSeconds());
received.setTimestamp(curTimestamp);
this.errMsgsRecvTotal.setCount(new ZeroBasedCounter32(this.errMsgsRecvTotal.getCount().getValue() + 1));
this.errMsgsRecvTotal.setTimestamp(curTimestamp);
}
内容来源于网络,如有侵权,请联系作者删除!