Package org.springframework.boot.system
Class ApplicationPid
java.lang.Object
org.springframework.boot.system.ApplicationPid
An application process ID.
- Since:
- 2.0.0
- Author:
- Phillip Webb
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ApplicationPid
public ApplicationPid() -
ApplicationPid
-
-
Method Details
-
isAvailable
public boolean isAvailable()Return if the application PID is available.- Returns:
true
if the PID is available- Since:
- 3.4.0
-
toLong
Return the application PID as aLong
.- Returns:
- the application PID or
null
- Since:
- 3.4.0
-
equals
-
hashCode
public int hashCode() -
toString
-
write
Write the PID to the specified file.- Parameters:
file
- the PID file- Throws:
IllegalStateException
- if no PID is available.IOException
- if the file cannot be written
-