Class PointerDoc

java.lang.Object
com.google.genkit.ai.agent.internal.PointerDoc

public class PointerDoc extends Object
Tiny POJO representing the contents of a per-session pointer file.

The pointer file lives at <dir>/<prefix>/.pointers/<sessionId>.json and contains a reference to the current latest-leaf snapshot for that session, allowing fast lookup without scanning all snapshot files.

  • Constructor Details

    • PointerDoc

      public PointerDoc()
      Default constructor (required for Jackson deserialization).
    • PointerDoc

      public PointerDoc(String currentSnapshotId, String currentCreatedAt, String updatedAt)
      Creates a new PointerDoc.
      Parameters:
      currentSnapshotId - the snapshot ID
      currentCreatedAt - the snapshot's createdAt timestamp
      updatedAt - when this pointer was written
  • Method Details

    • getCurrentSnapshotId

      public String getCurrentSnapshotId()
      Returns the current snapshot ID.
      Returns:
      the snapshot ID
    • setCurrentSnapshotId

      public void setCurrentSnapshotId(String currentSnapshotId)
      Sets the current snapshot ID.
      Parameters:
      currentSnapshotId - the snapshot ID
    • getCurrentCreatedAt

      public String getCurrentCreatedAt()
      Returns the current snapshot's createdAt timestamp.
      Returns:
      the createdAt timestamp (RFC-3339)
    • setCurrentCreatedAt

      public void setCurrentCreatedAt(String currentCreatedAt)
      Sets the current snapshot's createdAt timestamp.
      Parameters:
      currentCreatedAt - the createdAt timestamp (RFC-3339)
    • getUpdatedAt

      public String getUpdatedAt()
      Returns the timestamp when this pointer was last updated.
      Returns:
      the updatedAt timestamp (RFC-3339)
    • setUpdatedAt

      public void setUpdatedAt(String updatedAt)
      Sets the timestamp when this pointer was last updated.
      Parameters:
      updatedAt - the updatedAt timestamp (RFC-3339)