Class ExceptionMapperStatisticsImpl.Builder

  • Enclosing class:
    ExceptionMapperStatisticsImpl

    static class ExceptionMapperStatisticsImpl.Builder
    extends java.lang.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 Detail

      • exceptionMapperExecutionCountMap

        private java.util.Map<java.lang.Class<?>,​java.lang.Long> exceptionMapperExecutionCountMap
      • successfulMappings

        private long successfulMappings
      • unsuccessfulMappings

        private long unsuccessfulMappings
      • totalMappings

        private long totalMappings
    • Constructor Detail

      • Builder

        Builder()
    • Method Detail

      • addMapping

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

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

        public ExceptionMapperStatisticsImpl build()
        Build an instance of exception mapper statistics.
        Returns:
        New instance of exception mapper statistics.