Interface DistributedLock

All Known Implementing Classes:
InMemoryStores, RedisDistributedLock

public interface DistributedLock
Provides short-lived, owner-safe leases shared by orchestrator nodes.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A lock claim that releases only its own ownership token when closed.
  • Method Summary

    Modifier and Type
    Method
    Description
    tryAcquire(String key, Duration duration)
    Attempts to claim a key for a bounded duration without waiting.
  • Method Details

    • tryAcquire

      Optional<DistributedLock.Lease> tryAcquire(String key, Duration duration)
      Attempts to claim a key for a bounded duration without waiting.
      Parameters:
      key - globally meaningful lock key
      duration - lease lifetime
      Returns:
      owned lease, or empty when another node owns the key