Interface PeriodicGate

All Known Implementing Classes:
LocalPeriodicGate, StoreBackedPeriodicGate

public interface PeriodicGate
Coordinates periodic background work across callers (and optionally across nodes) using a minimum-gap throttle. A successful tryClaim(java.lang.String, java.time.Duration) means the caller may proceed; a false return means another caller recently claimed the slot or the gap has not elapsed.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    tryClaim(String name, Duration minGap)
    Attempts to claim the named periodic slot.
  • Method Details

    • tryClaim

      boolean tryClaim(String name, Duration minGap)
      Attempts to claim the named periodic slot.
      Parameters:
      name - logical slot identifier (e.g. "memory-flush:USER:alice" or "skill-curator")
      minGap - minimum elapsed time since the last successful claim
      Returns:
      true if the caller won the claim and may proceed, false otherwise