The machine's identity which is typically the hostname.
the machine's identity.
The process identifier which is typically the OS PID.
the process identifier.
The user's identity which is typically the OS login username.
the user's identity.
Compares this leaseholder to another leaseholder to determine if they are equal. Two leaseholders are equal if their username, hostname, and process id are the same.
the other leaseholder to compare.
true if the leaseholders are equal; false otherwise.
Compares this leaseholder to another leaseholder to determine if they are the same machine. Two leaseholders are the same machine if their username and hostname are the same.
the other leaseholder to compare.
true if the leaseholders are the same machine; false otherwise.
Static
defaultCreates a new leaseholder by retrieving the current user's identity, the current machine's hostname, and the current process's PID.
a new leaseholder instance.
Static
fromDeserializes a JSON string representation of a leaseholder into a new leaseholder instance.
the JSON string representation of a leaseholder.
a new leaseholder instance.
Static
ofCreates a new leaseholder with the given username. The hostname is set to the current machine's hostname and the process id is set to the current process's PID.
the user's identity.
a new leaseholder instance.
A representation of a leaseholder who is identified by a username, hostname, and process id (PID). This implementation is serializable to/from a JSON object and is comparable to other leaseholders.