public class Counter extends Object
| Constructor and Description |
|---|
Counter()
A Counter is a container for a namespace-aggregate map of AtomicLong counters
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCountByNS(String namespace)
Get the counter's count for the provided namespace
|
long |
getTotal()
Get the counter's total, which is the sum of the counter across all namespaces
|
void |
increment(String ns)
Increment the counter by 1 for the given namespace
|
void |
increment(String ns,
long count)
Increment the counter by the provided count amount for the given namespace
|
public Counter()
public void increment(String ns)
ns - - the namespace for the counterpublic void increment(String ns, long count)
ns - - the namespace for the countercount - - the amount by which to increment the counterpublic long getTotal()
public long getCountByNS(String namespace)
namespace - the namespace for which we want the countCopyright © 2012–2025 Aerospike, Inc. All rights reserved.