com.hazelcast.util
T
- public final class ItemCounter<T> extends Object
Constructor and Description |
---|
ItemCounter() |
Modifier and Type | Method and Description |
---|---|
void |
add(T item,
long delta)
Add delta to the item
|
boolean |
equals(Object o) |
long |
get(T item)
Get current counter for an item item
|
long |
getAndSet(T item,
long value)
Set counter for item and return previous value
|
int |
hashCode() |
void |
reset()
Reset state of the counter to 0.
|
void |
set(T item,
long value)
Set counter of item to value
|
public long get(T item)
item
- public void set(T item, long value)
item
- to set set the value forvalue
- a new valuepublic void add(T item, long delta)
item
- delta
- public void reset()
public long getAndSet(T item, long value)
item
- value
- Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.