@Counted(name = "countedMethod", absolute = true) public T countedMethod(Callable<T> callable) { try { return callable.call(); } catch (Exception cause) { throw new RuntimeException(cause); } } }
@Counted(name = "counterParent", absolute = true) public String counterParent() { return "counterParent"; } }
@Override @Counted(name = "stringThing", absolute = true, monotonic = true) void doThing(String s) { } }
@Counted(name = "things", monotonic = true) public String doAThing() { return "poop"; }
@Counted(monotonic = false) public String doYetAnotherThing() { return "anotherThing"; }
@GET @Counted public SeedsResponse getSeeds() throws IOException { return seeds.getSeeds(); } }
@GET @Path("/executor") @Counted public ExecutorConfig getExecutorConfig() throws ConfigStoreException { return ((CassandraSchedulerConfiguration)configurationManager.getTargetConfig()).getExecutorConfig(); }
/** * Gets the status of the Cassandra process. * @return A CassandraStatus object containing the status of the * Cassandra process. */ @GET @Counted @Path("/status") public CassandraStatus getStatus() { return getDaemon().getStatus(); }
@GET @Counted public ServiceConfig getIdentity() throws Exception { return configurationManager.getTargetConfig().getServiceConfig(); }
@Counted(name = "count", monotonic = true) @Schedule(hour = "*", minute = "*", second = "*", persistent = false) public void scheduledMethod() { counter.count(); } }
/** * Gets the configuration of the Cassandra daemon. * @return A CassandraConfig object containing the configuration of the * Cassandra daemon. */ @GET @Counted @Path("/configuration") public CassandraConfig getConfig() { return getDaemon().getTask().getConfig(); } }
@Timed(name = "GET_TICKETS_TIMER") @Metered(name = "GET_TICKETS_METER") @Counted(name="GET_TICKETS_COUNTER", monotonic=true) @Override public Collection<Ticket> getTickets(final Predicate predicate) { return this.delegate.getTickets(predicate); }
@Timed(name = "GET_TICKET_TIMER") @Metered(name = "GET_TICKET_METER") @Counted(name="GET_TICKET_COUNTER", monotonic=true) @Override public <T extends Ticket> T getTicket(final String ticketId, final Class<? extends Ticket> clazz) throws InvalidTicketException { return delegate.getTicket(ticketId, clazz); }
@Audit( action="TICKET_GRANTING_TICKET_DESTROYED", actionResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOLVER", resourceResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER") @Timed(name = "DESTROY_TICKET_GRANTING_TICKET_TIMER") @Metered(name="DESTROY_TICKET_GRANTING_TICKET_METER") @Counted(name="DESTROY_TICKET_GRANTING_TICKET_COUNTER", monotonic=true) @Override public List<LogoutRequest> destroyTicketGrantingTicket(@NotNull final String ticketGrantingTicketId) { return this.delegate.destroyTicketGrantingTicket(ticketGrantingTicketId); }
@Audit( action="SERVICE_TICKET", actionResolverName="GRANT_SERVICE_TICKET_RESOLVER", resourceResolverName="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER") @Timed(name = "GRANT_SERVICE_TICKET_TIMER") @Metered(name="GRANT_SERVICE_TICKET_METER") @Counted(name="GRANT_SERVICE_TICKET_COUNTER", monotonic=true) @Override public ServiceTicket grantServiceTicket(final String ticketGrantingTicketId, final Service service) throws TicketException { return this.delegate.grantServiceTicket(ticketGrantingTicketId, service); }
@Counted(name = "counter", monotonic = true) @ExceptionMetered(name = "exception") @Gauge(name = "gauge") @Metered(name = "meter") @Timed(name = "timer") public String metricsMethod() { return "value"; } }
@Audit( action="PROXY_GRANTING_TICKET", actionResolverName="GRANT_PROXY_GRANTING_TICKET_RESOLVER", resourceResolverName="GRANT_PROXY_GRANTING_TICKET_RESOURCE_RESOLVER") @Timed(name="GRANT_PROXY_GRANTING_TICKET_TIMER") @Metered(name="GRANT_PROXY_GRANTING_TICKET_METER") @Counted(name="GRANT_PROXY_GRANTING_TICKET_COUNTER", monotonic=true) @Override public TicketGrantingTicket delegateTicketGrantingTicket(final String serviceTicketId, final Credential... credentials) throws org.jasig.cas.authentication.AuthenticationException, TicketException { return this.delegate.delegateTicketGrantingTicket(serviceTicketId, credentials); }
@Audit( action="SERVICE_TICKET_VALIDATE", actionResolverName="VALIDATE_SERVICE_TICKET_RESOLVER", resourceResolverName="VALIDATE_SERVICE_TICKET_RESOURCE_RESOLVER") @Timed(name="VALIDATE_SERVICE_TICKET_TIMER") @Metered(name="VALIDATE_SERVICE_TICKET_METER") @Counted(name="VALIDATE_SERVICE_TICKET_COUNTER", monotonic=true) @Override public Assertion validateServiceTicket(final String serviceTicketId, final Service service) throws TicketException { return this.delegate.validateServiceTicket(serviceTicketId, service); }
@Audit( action="SERVICE_TICKET", actionResolverName="GRANT_SERVICE_TICKET_RESOLVER", resourceResolverName="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER") @Timed(name="GRANT_SERVICE_TICKET_TIMER") @Metered(name="GRANT_SERVICE_TICKET_METER") @Counted(name="GRANT_SERVICE_TICKET_COUNTER", monotonic=true) @Override public ServiceTicket grantServiceTicket( final String ticketGrantingTicketId, final Service service, final Credential... credentials) throws org.jasig.cas.authentication.AuthenticationException, TicketException { return this.delegate.grantServiceTicket(ticketGrantingTicketId, service, credentials); }
@Timed @Metered @Counted private static class TypeLevelAnnotatedClass { public void publicMethod() { } protected void protectedMethod() { } void packagePrivateMethod() { } } }