public void encodeBER(OutputStream outputStream) throws IOException { BER.encodeUnsignedInteger(outputStream, BER.COUNTER32, getValue()); }
public void encodeBER(OutputStream outputStream) throws IOException { BER.encodeUnsignedInteger(outputStream, BER.COUNTER32, getValue()); }
public void encodeBER(OutputStream outputStream) throws IOException { BER.encodeUnsignedInteger(outputStream, BER.COUNTER32, getValue()); }
/** * Adds a counter to this counter listener. If counter * events have been received already for the given <tt>oid</tt> * the provided counter will be incremented by the number of events * already counted and then <tt>counter</tt> replaces the old * counter. * @param oid * the object identifier of the counter instance (thus including * the .0 suffix). * @param counter * the counter to register. * @return * the counter previously associated with <tt>oid</tt> or * <tt>null</tt> if no such counter exist. * @since 2.0 */ public synchronized Counter32 add(OID oid, Counter32 counter) { Counter32 oldCounter = counters.get(oid); if (oldCounter != null) { long value = oldCounter.getValue(); counter.setValue(counter.getValue()+value); } return counters.put(oid, counter); }
/** * Adds a counter to this counter listener. If counter * events have been received already for the given <code>oid</code> * the provided counter will be incremented by the number of events * already counted and then <code>counter</code> replaces the old * counter. * @param oid * the object identifier of the counter instance (thus including * the .0 suffix). * @param counter * the counter to register. * @return * the counter previously associated with <code>oid</code> or * <code>null</code> if no such counter exist. * @since 2.0 */ public synchronized Counter32 add(OID oid, Counter32 counter) { Counter32 oldCounter = counters.get(oid); if (oldCounter != null) { long value = oldCounter.getValue(); counter.setValue(counter.getValue()+value); } return counters.put(oid, counter); }
result = Long.valueOf(((Counter32)val).getValue());
result = Long.valueOf(((Counter32)val).getValue());