Class ExceptionMapperStatisticsImpl.Builder
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.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 Summary
Fields Modifier and Type Field Description private ExceptionMapperStatisticsImpl
cached
private java.util.Map<java.lang.Class<?>,java.lang.Long>
exceptionMapperExecutionCountMap
private long
successfulMappings
private long
totalMappings
private long
unsuccessfulMappings
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addExceptionMapperExecution(java.lang.Class<?> mapper, int count)
Add an execution of exception mapper.(package private) void
addMapping(boolean success, int count)
Add mappings.ExceptionMapperStatisticsImpl
build()
Build an instance of exception mapper statistics.
-
-
-
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
-
cached
private ExceptionMapperStatisticsImpl cached
-
-
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 themapper
.
-
build
public ExceptionMapperStatisticsImpl build()
Build an instance of exception mapper statistics.- Returns:
- New instance of exception mapper statistics.
-
-