Class EppMetric.Builder

java.lang.Object
google.registry.monitoring.whitebox.EppMetric.Builder
Enclosing class:
EppMetric

public abstract static class EppMetric.Builder extends Object
A builder to create instances of EppMetric.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setCommandNameFromFlow

      public EppMetric.Builder setCommandNameFromFlow(String flowSimpleClassName)
    • setRegistrarId

      public abstract EppMetric.Builder setRegistrarId(String registrarId)
    • setRegistrarId

      public abstract EppMetric.Builder setRegistrarId(Optional<String> registrarId)
    • setTld

      public abstract EppMetric.Builder setTld(String tld)
    • setTld

      public abstract EppMetric.Builder setTld(Optional<String> tld)
    • setTlds

      public EppMetric.Builder setTlds(com.google.common.collect.ImmutableSet<String> tlds)
      Sets the single TLD field from a list of TLDs associated with a command.

      Due to cardinality reasons we cannot record combinations of different TLDs as might be seen in a domain check command, so if this happens we record "_various" instead. We also record "_invalid" for a TLD that does not exist in our system, as again that could blow up cardinality. Underscore prefixes are used for these sentinel values so that they cannot be confused with actual TLDs, which cannot start with underscores.

    • setStatus

      public abstract EppMetric.Builder setStatus(Result.Code code)
    • build

      public EppMetric build()
      Build an instance of EppMetric using this builder.

      If a clock was provided with setClock(), the end timestamp will be set to the current timestamp of the clock; otherwise end timestamp must have been previously set.