类 ApplicationPid

java.lang.Object
org.springframework.boot.system.ApplicationPid

public class ApplicationPid extends Object
An application process ID.
从以下版本开始:
2.0.0
作者:
Phillip Webb
  • 构造器详细资料

    • ApplicationPid

      public ApplicationPid()
    • ApplicationPid

      protected ApplicationPid(Long pid)
  • 方法详细资料

    • isAvailable

      public boolean isAvailable()
      Return if the application PID is available.
      返回:
      true if the PID is available
      从以下版本开始:
      3.4.0
    • toLong

      public Long toLong()
      Return the application PID as a Long.
      返回:
      the application PID or null
      从以下版本开始:
      3.4.0
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • write

      public void write(File file) throws IOException
      Write the PID to the specified file.
      参数:
      file - the PID file
      抛出:
      IllegalStateException - if no PID is available.
      IOException - if the file cannot be written