Class SimpleCollector.Builder<B extends SimpleCollector.Builder<B,​C>,​C extends SimpleCollector>

    • Constructor Detail

    • Method Detail

      • name

        public B name​(String name)
        Set the name of the metric. Required.
      • subsystem

        public B subsystem​(String subsystem)
        Set the subsystem of the metric. Optional.
      • namespace

        public B namespace​(String namespace)
        Set the namespace of the metric. Optional.
      • unit

        public B unit​(String unit)
        Set the unit of the metric. Optional.
        Since:
        0.10.0
      • help

        public B help​(String help)
        Set the help string of the metric. Required.
      • labelNames

        public B labelNames​(String... labelNames)
        Set the labelNames of the metric. Optional, defaults to no labels.
      • create

        public abstract C create()
        Return the constructed collector.

        Abstract due to generics limitations.

      • register

        public C register()
        Create and register the Collector with the default registry.