ClaimPolicy

org.llm4s.agent.graph.ClaimPolicy
See theClaimPolicy companion object
final case class ClaimPolicy

How a GraphRuntime holds its runs' claims: each claim lasts ttl from when the store grants or renews it, and a running run renews it every renewEvery, on a virtual thread named llm4s-claim-<threadId>, until the run ends and releases it. A process that dies stops renewing, so after at most ttl its threads can be recovered elsewhere; a live run that cannot reach its store for longer than ttl can lose its claim the same way, after which its commits are refused (GraphError.StaleClaim) and it fails with GraphError.CheckpointWriteFailed.

Both must be positive and renewEvery shorter than ttl: apply and the with* setters throw IllegalArgumentException otherwise, and ClaimPolicy.of returns a ValidationError.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withRenewEvery(r: FiniteDuration): ClaimPolicy
def withTtl(t: FiniteDuration): ClaimPolicy

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product