Package xyz.block.ftl

Interface LeaseClient

  • All Implemented Interfaces:

    
    public interface LeaseClient
    
                        

    Client that can be used to acquire a FTL lease. If the lease cannot be acquired a LeaseFailedException is thrown.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract LeaseHandle acquireLease(Duration duration, Array<String> keys) Acquire a lease for the given keys.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • acquireLease

         abstract LeaseHandle acquireLease(Duration duration, Array<String> keys)

        Acquire a lease for the given keys. The lease will be held for the given duration.

        Parameters:
        duration - The time to acquire the lease for
        keys - The lease keys
        Returns:

        A handle that can be used to release the lease