Class ThrownStore.Builder

java.lang.Object
org.apache.juneau.rest.server.stats.ThrownStore.Builder
Enclosing class:
ThrownStore

public static class ThrownStore.Builder extends Object
Builder class.
  • Constructor Details

    • Builder

      protected Builder(BeanStore beanStore)
      Constructor.
      Parameters:
      beanStore - The bean store to use for creating beans.
  • Method Details

    • beanStore

      public BeanStore 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 pass Clock.fixed(Instant, ZoneId) to make the occurrence times reported by ThrownStats deterministic.

      Parameters:
      value - The new value for this setting. Can be null (inherits the default).
      Returns:
      This object.
    • ignoreClasses

      public ThrownStore.Builder ignoreClasses(Class<?>... value)
      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 the build() method with a pre-instantiated instance.
      Parameters:
      value - The setting value. Can be null (the build() method instantiates the type instead).
      Returns:
      This object.
    • parent

      Specifies the parent store of this store.

      Parent stores are used for aggregating statistics across multiple child stores.
      The ThrownStore.GLOBAL store can be used for aggregating all thrown exceptions in a single JVM.

      Parameters:
      value - The parent store. Can be null for a root store with no parent chain.
      Returns:
      This object.
    • statsImplClass

      Specifies a subclass of ThrownStats to use for individual method statistics.
      Parameters:
      value - The new value for this setting.
      Returns:
      This object.
    • type

      public ThrownStore.Builder type(Class<?> value)
      Overrides the bean type produced by the build() method.
      Parameters:
      value - The setting value. Can be null (defaults to ThrownStore).
      Returns:
      This object.
    • build

      public ThrownStore build()
      Creates the bean.
      Returns:
      A new bean.