code: public long getId(final String agent) throws InvalidUserAgentError,
              InvalidSystemClock {
          if (!isValidUserAgent(agent)) {
              exceptionsCounter.inc();
              throw new InvalidUserAgentError();
          }
  
          final long id = nextId();
          genCounter(agent);
  
          return id;
      }
docs: Get the next ID for a given user-agent
  
  @param agent
  User Agent
  @return Generated ID
  @throws InvalidUserAgentError
  When the user agent is invalid
  @throws InvalidSystemClock
  When the system clock is moving backward