Class ResourceMethodStatisticsImpl.Builder
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ResourceMethodStatisticsImpl.Builder
- Enclosing class:
ResourceMethodStatisticsImpl
Builder of resource method statistics.
Must be thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResourceMethodStatisticsImpl
private final AtomicReference
<ExecutionStatisticsImpl.Builder> private final ResourceMethod
private final AtomicReference
<ExecutionStatisticsImpl.Builder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addResourceMethodExecution
(long methodStartTime, long methodDuration, long requestStartTime, long requestDuration) Add execution of the resource method to the statistics.(package private) ResourceMethodStatisticsImpl
build()
Build an instance of resource method statistics.
-
Field Details
-
resourceMethod
-
resourceMethodExecutionStatisticsBuilder
private final AtomicReference<ExecutionStatisticsImpl.Builder> resourceMethodExecutionStatisticsBuilder -
requestExecutionStatisticsBuilder
-
cached
-
-
Constructor Details
-
Builder
Builder(ResourceMethod resourceMethod) Create a new builder instance.- Parameters:
resourceMethod
- Resource method for which statistics are evaluated.
-
-
Method Details
-
build
ResourceMethodStatisticsImpl build()Build an instance of resource method statistics.- Returns:
- New instance of resource method statistics.
-
addResourceMethodExecution
void addResourceMethodExecution(long methodStartTime, long methodDuration, long requestStartTime, long requestDuration) Add execution of the resource method to the statistics.- Parameters:
methodStartTime
- Time spent on execution of resource method itself (Unix timestamp format).methodDuration
- Time of execution of the resource method.requestStartTime
- Time of whole request processing (from receiving the request until writing the response). (Unix timestamp format)requestDuration
- Time when the request matching to the executed resource method has been received by Jersey.
-