Package org.bsc.langgraph4j.checkpoint
Class SQLiteSaver
java.lang.Object
org.bsc.langgraph4j.checkpoint.AbstractCheckpointSaver
org.bsc.langgraph4j.checkpoint.AbstractSQLiteSaver
org.bsc.langgraph4j.checkpoint.SQLiteSaver
- All Implemented Interfaces:
BaseCheckpointSaver,LG4JLoggable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bsc.langgraph4j.checkpoint.AbstractSQLiteSaver
AbstractSQLiteSaver.AbstractBuilder<B extends AbstractSQLiteSaver.AbstractBuilder<B>>Nested classes/interfaces inherited from interface org.bsc.langgraph4j.checkpoint.BaseCheckpointSaver
BaseCheckpointSaver.SubGraphSaver, BaseCheckpointSaver.Tag -
Field Summary
Fields inherited from class org.bsc.langgraph4j.checkpoint.AbstractSQLiteSaver
datasource, sqlCommandsFields inherited from interface org.bsc.langgraph4j.checkpoint.BaseCheckpointSaver
THREAD_ID_DEFAULTFields inherited from interface org.bsc.langgraph4j.LG4JLoggable
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SQLiteSaver.Builderbuilder()<State extends AgentState>
CompletableFuture<InterruptionMetadata<State>>registerInterruption(RunnableConfig config, InterruptionMetadata<State> interruptionMetadata) Register Interrupt of the execution for the given config and provide interruption metadata.protected BaseCheckpointSaver.TagreleaseCheckpoints(RunnableConfig config, LinkedList<Checkpoint> checkpoints, @Nullable String message) protected BaseCheckpointSaver.TagreleaseCheckpointsOnError(RunnableConfig config, LinkedList<Checkpoint> checkpoints, Exception exception) protected final Stringprotected final Stringtag(RunnableConfig config, Integer version) Methods inherited from class org.bsc.langgraph4j.checkpoint.AbstractSQLiteSaver
datasource, decodeState, encodeState, exec, execTransaction, initTable, insertedCheckpoint, loadCheckpoints, requireNotBlank, sqlCommands, updatedCheckpointMethods inherited from class org.bsc.langgraph4j.checkpoint.AbstractCheckpointSaver
get, list, listSubGraphSaver, put, putSubGraphSaver, release, release, releaseOnErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bsc.langgraph4j.checkpoint.BaseCheckpointSaver
lastTag, threadId
-
Constructor Details
-
SQLiteSaver
- Throws:
Exception
-
-
Method Details
-
builder
-
sqlCommandsResourcePath
- Specified by:
sqlCommandsResourcePathin classAbstractSQLiteSaver
-
sqlInitResourcePath
- Specified by:
sqlInitResourcePathin classAbstractSQLiteSaver
-
releaseCheckpoints
protected BaseCheckpointSaver.Tag releaseCheckpoints(RunnableConfig config, LinkedList<Checkpoint> checkpoints, @Nullable String message) throws Exception - Specified by:
releaseCheckpointsin classAbstractCheckpointSaver- Throws:
Exception
-
releaseCheckpointsOnError
protected BaseCheckpointSaver.Tag releaseCheckpointsOnError(RunnableConfig config, LinkedList<Checkpoint> checkpoints, Exception exception) throws Exception - Specified by:
releaseCheckpointsOnErrorin classAbstractCheckpointSaver- Throws:
Exception
-
registerInterruption
public <State extends AgentState> CompletableFuture<InterruptionMetadata<State>> registerInterruption(RunnableConfig config, InterruptionMetadata<State> interruptionMetadata) Description copied from interface:BaseCheckpointSaverRegister Interrupt of the execution for the given config and provide interruption metadata. this is used internally and should not be called directly by the user.- Parameters:
config- the RunnableConfig for which to register the interruptioninterruptionMetadata- the metadata associated with the interruption
-
tag
public Optional<BaseCheckpointSaver.Tag> tag(RunnableConfig config, Integer version) throws Exception - Throws:
Exception
-