Class CounterServiceImpl
java.lang.Object
com.codebarrel.automation.api.service.CounterServiceImpl
- All Implemented Interfaces:
CounterService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetNext(TenantContext context, String key) Gets the next value.longreset(TenantContext context, String key) Resets the given counter to 0
-
Constructor Details
-
CounterServiceImpl
-
-
Method Details
-
getNext
Description copied from interface:CounterServiceGets the next value. If no counter for exists, creates a new one and returns 0;- Specified by:
getNextin interfaceCounterService- Parameters:
key- the unique key for the counter.
-
reset
Description copied from interface:CounterServiceResets the given counter to 0- Specified by:
resetin interfaceCounterService- Parameters:
key- the unique key for the counter.
-