Class CounterServiceImpl

java.lang.Object
com.codebarrel.automation.api.service.CounterServiceImpl
All Implemented Interfaces:
CounterService

@Component public class CounterServiceImpl extends Object implements CounterService
  • Constructor Details

    • CounterServiceImpl

      @Inject public CounterServiceImpl(CounterStore store)
  • Method Details

    • getNext

      public long getNext(TenantContext context, String key)
      Description copied from interface: CounterService
      Gets the next value. If no counter for exists, creates a new one and returns 0;
      Specified by:
      getNext in interface CounterService
      Parameters:
      key - the unique key for the counter.
    • reset

      public long reset(TenantContext context, String key)
      Description copied from interface: CounterService
      Resets the given counter to 0
      Specified by:
      reset in interface CounterService
      Parameters:
      key - the unique key for the counter.