SweepPolicy

org.llm4s.agent.graph.SweepPolicy
See theSweepPolicy companion object
@Experimental
final case class SweepPolicy

What a store-wide retention sweep (Checkpointer.sweep, design 4.53) does to each thread it visits: it prunes the thread's history by retention, exactly as Checkpointer.prune does, and - when tombstoneAge is set - reclaims the tombstone of a deleted thread once the store deleted it more than tombstoneAge ago, by the store's clock. At most batchSize threads are visited by one call, so every call stays within the store's bound however many threads it holds; a caller pages through the store with the cursor each call returns.

SweepPolicy() changes nothing: it keeps every checkpoint and event and reclaims no tombstone.

apply and the with* setters throw IllegalArgumentException for a non-positive tombstoneAge or a batchSize outside 1 to SweepPolicy.MaxBatchSize; SweepPolicy.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 withBatchSize(n: Int): SweepPolicy
def withTombstoneAge(age: FiniteDuration): SweepPolicy
def withTombstoneAge(age: Option[FiniteDuration]): SweepPolicy

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product