Package co.stateful.retry
Class ReCounter
- java.lang.Object
-
- co.stateful.retry.ReCounter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longincrementAndGet(long delta)Add value to it.Stringname()Its name.voidset(long value)Set specific value.
-
-
-
Constructor Detail
-
ReCounter
public ReCounter(Counter orgn)
Ctor.- Parameters:
orgn- Original object
-
-
Method Detail
-
name
@RetryOnFailure(verbose=false, attempts=20, delay=20L, unit=SECONDS) public String name()Description copied from interface:CounterIts name.
-
set
@RetryOnFailure(verbose=false, attempts=20, delay=20L, unit=SECONDS) public void set(long value) throws IOExceptionDescription copied from interface:CounterSet specific value.- Specified by:
setin interfaceCounter- Parameters:
value- Value to set- Throws:
IOException- If some I/O problem
-
incrementAndGet
@RetryOnFailure(verbose=false, attempts=20, delay=20L, unit=SECONDS) public long incrementAndGet(long delta) throws IOExceptionDescription copied from interface:CounterAdd value to it.- Specified by:
incrementAndGetin interfaceCounter- Parameters:
delta- Delta to add (can be zero or negative)- Returns:
- New value
- Throws:
IOException- If some I/O problem
-
-