Class MeterIdPrefix

java.lang.Object
com.linecorp.armeria.common.metric.MeterIdPrefix

public final class MeterIdPrefix extends Object
A common prefix of Meter.Id which consists of Meter name and Tags.
  • Constructor Details

    • MeterIdPrefix

      public MeterIdPrefix(String name)
      Creates a new instance with no Tags.
      Parameters:
      name - the Meter name
    • MeterIdPrefix

      public MeterIdPrefix(String name, String... tags)
      Creates a new instance.
      Parameters:
      name - the Meter name
      tags - the keys and values of the Tags
    • MeterIdPrefix

      public MeterIdPrefix(String name, Iterable<Tag> tags)
      Creates a new instance.
      Parameters:
      name - the Meter name
      tags - the Tags of the Meter
  • Method Details

    • name

      public String name()
      Returns the name.
    • name

      public String name(String suffix)
      Returns the name concatenated by the specified suffix.
    • tags

      public List<Tag> tags()
      Returns the Tags.
    • tags

      public List<Tag> tags(String... tags)
      Returns the Tags concatenated by the specified tags.
    • tags

      public List<Tag> tags(Iterable<Tag> tags)
      Returns the Tags concatenated by the specified tags.
    • append

      public MeterIdPrefix append(String suffix)
      Returns a newly-created instance whose name is concatenated by the specified suffix.
    • appendWithTags

      public MeterIdPrefix appendWithTags(String suffix, String... tags)
      Returns a newly-created instance whose name is concatenated by the specified suffix and tags.
    • appendWithTags

      public MeterIdPrefix appendWithTags(String suffix, Iterable<Tag> tags)
      Returns a newly-created instance whose name is concatenated by the specified suffix and tags.
    • withTags

      public MeterIdPrefix withTags(String... tags)
      Returns a newly-created instance whose name is concatenated by the specified tags.
    • withTags

      public MeterIdPrefix withTags(Iterable<Tag> tags)
      Returns a newly-created instance whose name is concatenated by the specified tags.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable @Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object