Code example for AtomicLong

Methods: incrementAndGet

0
    } 
 
    @GET 
    @Timed 
    public Saying sayHello(@QueryParam("name") Optional<String> name) { 
        return new Saying(counter.incrementAndGet(), 
                String.format(template, name.or(defaultName))); 
    } 
}