Class StatisticDTO.Builder

java.lang.Object
org.apache.gravitino.dto.stats.StatisticDTO.Builder
Enclosing class:
StatisticDTO

public static class StatisticDTO.Builder extends Object
Builder class for constructing instances of StatisticDTO.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withName

      public StatisticDTO.Builder withName(String name)
      Sets the name of the statistic.
      Parameters:
      name - the name of the statistic
      Returns:
      the builder instance
    • withValue

      public StatisticDTO.Builder withValue(Optional<StatisticValue<?>> value)
      Sets the value of the statistic.
      Parameters:
      value - the value of the statistic
      Returns:
      the builder instance
    • withReserved

      public StatisticDTO.Builder withReserved(boolean reserved)
      Sets whether the statistic is reserved.
      Parameters:
      reserved - true if the statistic is reserved, false otherwise
      Returns:
      the builder instance
    • withModifiable

      public StatisticDTO.Builder withModifiable(boolean modifiable)
      Sets whether the statistic is modifiable.
      Parameters:
      modifiable - true if the statistic is modifiable, false otherwise
      Returns:
      the builder instance
    • withAudit

      public StatisticDTO.Builder withAudit(AuditDTO audit)
      Sets the audit information for the statistic.
      Parameters:
      audit - the audit information
      Returns:
      the builder instance
    • build

      public StatisticDTO build()
      Builds an instance of StatisticDTO with the provided values.
      Returns:
      a new instance of StatisticDTO