Package co.stateful
Interface Counter
-
- All Known Implementing Classes:
ReCounter
@Immutable public interface CounterCounter.- Since:
- 0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longincrementAndGet(long delta)Add value to it.Stringname()Its name.voidset(long value)Set specific value.
-
-
-
Method Detail
-
name
String name()
Its name.- Returns:
- Name of this lock
- Since:
- 0.8
-
set
void set(long value) throws IOException
Set specific value.- Parameters:
value- Value to set- Throws:
IOException- If some I/O problem
-
incrementAndGet
long incrementAndGet(long delta) throws IOExceptionAdd value to it.- Parameters:
delta- Delta to add (can be zero or negative)- Returns:
- New value
- Throws:
IOException- If some I/O problem
-
-