Class StoreBackedPeriodicGate

java.lang.Object
io.agentscope.harness.agent.coordination.StoreBackedPeriodicGate
All Implemented Interfaces:
PeriodicGate

public final class StoreBackedPeriodicGate extends Object implements PeriodicGate
Distributed PeriodicGate backed by BaseStore.putIfVersion(java.util.List<java.lang.String>, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, long). Enables cross-node coordination of periodic background work (memory maintenance, skill curator, etc.).
  • Constructor Details

    • StoreBackedPeriodicGate

      public StoreBackedPeriodicGate(BaseStore store)
  • Method Details

    • tryClaim

      public boolean tryClaim(String name, Duration minGap)
      Description copied from interface: PeriodicGate
      Attempts to claim the named periodic slot.
      Specified by:
      tryClaim in interface PeriodicGate
      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