Class ThrownStore.Builder
java.lang.Object
org.apache.juneau.rest.server.stats.ThrownStore.Builder
- Enclosing class:
- ThrownStore
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the bean store.build()Creates the bean.Specifies the clock used to stamp the first and last occurrence times of recorded exceptions.ignoreClasses(Class<?>... value) Specifies the list of classes to ignore when calculating stack traces.Overrides the bean returned by thebuild()method with a pre-instantiated instance.parent(ThrownStore value) Specifies the parent store of this store.statsImplClass(Class<? extends ThrownStats> value) Specifies a subclass ofThrownStatsto use for individual method statistics.Overrides the bean type produced by thebuild()method.
-
Constructor Details
-
Builder
Constructor.- Parameters:
beanStore- The bean store to use for creating beans.
-
-
Method Details
-
beanStore
Returns the bean store.- Returns:
- The bean store.
-
clock
Specifies the clock used to stamp the first and last occurrence times of recorded exceptions.Defaults to the parent store's clock, or
Clock.systemUTC()if there is no parent. Tests can passClock.fixed(Instant, ZoneId)to make the occurrence times reported byThrownStatsdeterministic.- Parameters:
value- The new value for this setting. Can benull (inherits the default).- Returns:
- This object.
-
ignoreClasses
Specifies the list of classes to ignore when calculating stack traces.Stack trace elements that are the specified class will be ignored.
- Parameters:
value- The list of classes to ignore.- Returns:
- This object.
-
impl
Overrides the bean returned by thebuild()method with a pre-instantiated instance. -
parent
Specifies the parent store of this store.Parent stores are used for aggregating statistics across multiple child stores.
TheThrownStore.GLOBALstore can be used for aggregating all thrown exceptions in a single JVM.- Parameters:
value- The parent store. Can benull for a root store with no parent chain.- Returns:
- This object.
-
statsImplClass
Specifies a subclass ofThrownStatsto use for individual method statistics.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
type
Overrides the bean type produced by thebuild()method.- Parameters:
value- The setting value. Can benull (defaults toThrownStore).- Returns:
- This object.
-
build
Creates the bean.- Returns:
- A new bean.
-