2526272829303132
} @GET @Timed public Saying sayHello(@QueryParam("name") Optional<String> name) { return new Saying(counter.incrementAndGet(), String.format(template, name.or(defaultName))); }
29303132333435
@GET @Timed(name = "get-requests") @CacheControl(maxAge = 1, maxAgeUnit = TimeUnit.DAYS) public Saying sayHello(@QueryParam("name") Optional<String> name) { return new Saying(counter.incrementAndGet(), template.render(name)); }