Interface Counter
public interface Counter
The redis counter structure
-
Method Details
-
get
Number get()Returns the counter value- Returns:
- The counter value
-
increment
Number increment()Increments by one the counter- Returns:
- the increment by one result
-
increment
Increments the counter- Parameters:
value- the value to be increased- Returns:
- the increment result
- Throws:
NullPointerException- when value is null
-
decrement
Number decrement()Decrements by one the counter- Returns:
- the increment by one result
-
decrement
Decrements- Parameters:
value- the value to be decreased- Returns:
- the decrement result
-
delete
void delete()Delete this Counter -
expire
Defines a ttl to SortedSet- Parameters:
ttl- the ttl- Throws:
NullPointerException- when either key and ttl are null
-
persist
void persist()Removes the ttl
-