Package co.stateful
Interface Counter
-
- All Known Implementing Classes:
ReCounter
@Immutable public interface Counter
Counter.- Since:
- 0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
incrementAndGet(long delta)
Add value to it.String
name()
Its name.void
set(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 IOException
Add value to it.- Parameters:
delta
- Delta to add (can be zero or negative)- Returns:
- New value
- Throws:
IOException
- If some I/O problem
-
-