public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) { return new ZeroBasedCounter32(java.lang.Long.valueOf(defaultValue)); }
@XmlElement(name = "in-bad-rpcs") public Long getInBadRpcs() { return managementSession.getInBadRpcs().getValue(); }
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())); }
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())); }
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) { return new ZeroBasedCounter32(Long.valueOf(defaultValue)); }
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); }
@XmlElement(name = "out-notifications") public Long getOutNotifications() { return managementSession.getOutNotifications().getValue(); }
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) { return new ZeroBasedCounter32(Long.valueOf(defaultValue)); }
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); }
@XmlElement(name = "in-rpcs") public Long getInRpcs() { return managementSession.getInRpcs().getValue(); }
public static ZeroBasedCounter32 getDefaultInstance(String defaultValue) { return new ZeroBasedCounter32(Long.valueOf(defaultValue)); }
@XmlElement(name = "out-rpc-errors") public Long getOutRpcErrors() { return managementSession.getOutRpcErrors().getValue(); }
private static Received newReceivedInstance() { final Received recv = new Received(); recv.setCount(new ZeroBasedCounter32(0L)); return recv; }
private static Sent newSentInstance() { final Sent sent = new Sent(); sent.setCount(new ZeroBasedCounter32(0L)); return sent; }
public ZeroBasedCounter32 getCountAsZeroBasedCounter32() { return new ZeroBasedCounter32(safetyCheck(getCount())); } }
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(); }