Interface Leased

  • All Known Implementing Classes:
    ClusteredExecutorInfo

    public interface Leased
    A Leased object is one that supports tracking of last use and automated cleanup upon expiry.
    Since:
    21.12
    Author:
    bo
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getLeaseExpiryTime()
      Obtains the time the lease will expiry (in milliseconds since the epoc).
      boolean onLeaseExpiry()
      A callback invoked as part of an InvocableMap.EntryProcessor to perform custom lease expiry operations when a lease has expired.
      void renew()
      Renews the lease for some period of time.
    • Method Detail

      • renew

        void renew()
        Renews the lease for some period of time.
      • getLeaseExpiryTime

        long getLeaseExpiryTime()
        Obtains the time the lease will expiry (in milliseconds since the epoc).
        Returns:
        the time in milliseconds since the epoc
      • onLeaseExpiry

        boolean onLeaseExpiry()
        A callback invoked as part of an InvocableMap.EntryProcessor to perform custom lease expiry operations when a lease has expired.
        Returns:
        true if the Leased state was mutated and should be saved, false otherwise