Record Class FD_HOST.ExternalPingCommand

java.lang.Object
java.lang.Record
org.jgroups.protocols.FD_HOST.ExternalPingCommand
All Implemented Interfaces:
FD_HOST.PingCommand
Enclosing class:
FD_HOST

protected static record FD_HOST.ExternalPingCommand(String cmd) extends Record implements FD_HOST.PingCommand
Version:
3.5, 3.4.5
Author:
Bela Ban
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates an instance of a ExternalPingCommand record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    cmd()
    Returns the value of the cmd record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    isAlive(InetAddress host, long timeout)
    Checks whether a given host is alive
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExternalPingCommand

      protected ExternalPingCommand(String cmd)
      Creates an instance of a ExternalPingCommand record class.
      Parameters:
      cmd - the value for the cmd record component
  • Method Details

    • isAlive

      public boolean isAlive(InetAddress host, long timeout) throws Exception
      Description copied from interface: FD_HOST.PingCommand
      Checks whether a given host is alive
      Specified by:
      isAlive in interface FD_HOST.PingCommand
      Parameters:
      host - The host to be checked for liveness
      timeout - Number of milliseconds to wait for the check to complete
      Returns:
      true if the host is alive, else false
      Throws:
      Exception
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • cmd

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