Class ExceptionMapperStatisticsImpl.Builder

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ExceptionMapperStatisticsImpl.Builder
Enclosing class:
ExceptionMapperStatisticsImpl

static class ExceptionMapperStatisticsImpl.Builder extends Object
Builder of exception mapper statistics.

This builder does not need to be threadsafe since it's called only from the jersey-background-task-scheduler.

  • Field Details

    • exceptionMapperExecutionCountMap

      private Map<Class<?>,Long> exceptionMapperExecutionCountMap
    • successfulMappings

      private long successfulMappings
    • unsuccessfulMappings

      private long unsuccessfulMappings
    • totalMappings

      private long totalMappings
    • cached

  • Constructor Details

    • Builder

      Builder()
  • Method Details

    • addMapping

      void addMapping(boolean success, int count)
      Add mappings.
      Parameters:
      success - True if mappings were successful.
      count - Number of mappings.
    • addExceptionMapperExecution

      void addExceptionMapperExecution(Class<?> mapper, int count)
      Add an execution of exception mapper.
      Parameters:
      mapper - Exception mapper.
      count - Number of executions of the mapper.
    • build

      Build an instance of exception mapper statistics.
      Returns:
      New instance of exception mapper statistics.