public class NonNegativeCounter
extends java.lang.Object
implements org.apache.flink.metrics.Counter
This class is used in a non-thread safe manner, so it is important all modifications are checked before updating the count. Otherwise, negative values might be reported.
Constructor and Description |
---|
NonNegativeCounter() |
Modifier and Type | Method and Description |
---|---|
void |
dec() |
void |
dec(long value) |
long |
getCount() |
void |
inc() |
void |
inc(long value) |
public void inc()
inc
in interface org.apache.flink.metrics.Counter
public void inc(long value)
inc
in interface org.apache.flink.metrics.Counter
public void dec()
dec
in interface org.apache.flink.metrics.Counter
public void dec(long value)
dec
in interface org.apache.flink.metrics.Counter
public long getCount()
getCount
in interface org.apache.flink.metrics.Counter
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.