Record Class IdleProcessSetting

java.lang.Object
java.lang.Record
com.iohao.net.external.core.hook.internal.IdleProcessSetting
Record Components:
pong - true : respond to the client with a heartbeat (pong)
readerIdleTime - Read - heartbeat time
writerIdleTime - Write - heartbeat time
allIdleTime - All - heartbeat time
timeUnit - Heartbeat time unit - defaults to seconds
idleHook - Heartbeat hook

public record IdleProcessSetting(boolean pong, long readerIdleTime, long writerIdleTime, long allIdleTime, TimeUnit timeUnit, IdleHook<?> idleHook) extends Record
IdleProcessSetting
Since:
25.1
Author:
渔民小镇
date:
2025-10-16
  • Constructor Details

    • IdleProcessSetting

      public IdleProcessSetting(boolean pong, long readerIdleTime, long writerIdleTime, long allIdleTime, TimeUnit timeUnit, IdleHook<?> idleHook)
      Creates an instance of a IdleProcessSetting record class.
      Parameters:
      pong - the value for the pong record component
      readerIdleTime - the value for the readerIdleTime record component
      writerIdleTime - the value for the writerIdleTime record component
      allIdleTime - the value for the allIdleTime record component
      timeUnit - the value for the timeUnit record component
      idleHook - the value for the idleHook record component
  • Method Details

    • builder

      public static IdleProcessSettingBuilder builder()
    • toString

      public final 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.
    • pong

      public boolean pong()
      Returns the value of the pong record component.
      Returns:
      the value of the pong record component
    • readerIdleTime

      public long readerIdleTime()
      Returns the value of the readerIdleTime record component.
      Returns:
      the value of the readerIdleTime record component
    • writerIdleTime

      public long writerIdleTime()
      Returns the value of the writerIdleTime record component.
      Returns:
      the value of the writerIdleTime record component
    • allIdleTime

      public long allIdleTime()
      Returns the value of the allIdleTime record component.
      Returns:
      the value of the allIdleTime record component
    • timeUnit

      public TimeUnit timeUnit()
      Returns the value of the timeUnit record component.
      Returns:
      the value of the timeUnit record component
    • idleHook

      public IdleHook<?> idleHook()
      Returns the value of the idleHook record component.
      Returns:
      the value of the idleHook record component