Record Class StatActionInOut.TimeRange

java.lang.Object
java.lang.Record
com.iohao.net.framework.core.flow.internal.StatActionInOut.TimeRange
Record Components:
start - Start time, inclusive
end - End time, inclusive
count - Execution count triggered within this time range
name - Name
Enclosing class:
StatActionInOut

public static record StatActionInOut.TimeRange(long start, long end, LongAdder count, String name) extends Record
PluginInOut - StatActionInOut - Action Call Statistics Plugin - Time Range Record
Author:
渔民小镇
  • Constructor Details

    • TimeRange

      public TimeRange(long start, long end, LongAdder count, String name)
      Creates an instance of a TimeRange record class.
      Parameters:
      start - the value for the start record component
      end - the value for the end record component
      count - the value for the count record component
      name - the value for the name record component
  • Method Details

    • create

      public static StatActionInOut.TimeRange create(long start, long end)
      Create time range
      Parameters:
      start - Start time, inclusive
      end - End time, inclusive
      Returns:
      TimeRange
    • create

      public static StatActionInOut.TimeRange create(long start, long end, String name)
      Create time range and specify a name
      Parameters:
      start - Start time, inclusive
      end - End time, inclusive
      name - Name for printing
      Returns:
      TimeRange
    • toString

      public @NonNull String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • start

      public long start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public long end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • count

      public LongAdder count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component