Interface Node
@PolarisImmutable
public interface Node
Represents the local node's ID and informative, mutable state information.
-
Method Details
-
id
int id()Returns the ID of this node.- Returns:
- ID of this node
- Throws:
IllegalStateException- if the lease is no longer valid, for example, expired before it being renewed
-
valid
default boolean valid(long nowInMillis) -
leaseTimestamp
Instant leaseTimestamp() -
renewLeaseTimestamp
-
expirationTimestamp
Instant expirationTimestamp()Timestamp since which this node's lease is no longer valid.
-