Interface CounterService

All Known Implementing Classes:
CounterServiceImpl

public interface CounterService
Simple service for getting an incremental value based on a given key
  • Method Details

    • getNext

      long getNext(TenantContext context, String key)
      Gets the next value. If no counter for exists, creates a new one and returns 0;
      Parameters:
      key - the unique key for the counter.
    • reset

      long reset(TenantContext context, String key)
      Resets the given counter to 0
      Parameters:
      key - the unique key for the counter.