Class RedisRemoteSnapshotClient

java.lang.Object
io.agentscope.extensions.redis.snapshot.RedisRemoteSnapshotClient
All Implemented Interfaces:
io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient

public class RedisRemoteSnapshotClient extends Object implements io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
RemoteSnapshotClient backed by Redis binary values.
  • Constructor Details

    • RedisRemoteSnapshotClient

      public RedisRemoteSnapshotClient(redis.clients.jedis.UnifiedJedis jedis, String keyPrefix, Integer ttlSeconds)
      Creates a Redis-backed snapshot client.
      Parameters:
      jedis - initialized jedis client
      keyPrefix - redis key prefix (optional)
      ttlSeconds - optional TTL in seconds (null or negative means no TTL)
  • Method Details

    • upload

      public void upload(String snapshotId, InputStream data) throws Exception
      Specified by:
      upload in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception
    • download

      public InputStream download(String snapshotId) throws Exception
      Specified by:
      download in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception
    • exists

      public boolean exists(String snapshotId) throws Exception
      Specified by:
      exists in interface io.agentscope.harness.agent.sandbox.snapshot.RemoteSnapshotClient
      Throws:
      Exception