public interface NodeLease
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Node representation for this lease if the lease has not been released or null.
    int
    Returns the node ID if the lease is active/valid or -1.
    void
    Permanently release the lease.
    void
    Force a lease renewal, generally not recommended nor necessary.
  • Method Details

    • node

      @Nullable Node node()
      Returns the Node representation for this lease if the lease has not been released or null.
    • release

      void release()
      Permanently release the lease. Does nothing, if already released. Throws if persisting the released state fails.
    • renew

      void renew()
      Force a lease renewal, generally not recommended nor necessary. Throws, if the lease is already released.
    • nodeIdIfValid

      int nodeIdIfValid()
      Returns the node ID if the lease is active/valid or -1.