Class RedissonAgentStateStore

java.lang.Object
io.agentscope.extensions.redis.state.redisson.RedissonAgentStateStore
All Implemented Interfaces:
io.agentscope.core.state.AgentStateStore

@Deprecated public class RedissonAgentStateStore extends Object implements io.agentscope.core.state.AgentStateStore
Deprecated.
Use RedisAgentStateStore with redissonClient instead. RedisAgentStateStore provides a unified session implementation that works with multiple Redis clients. For basic usage, simple constructors are available. For advanced configuration, use RedisAgentStateStore.builder()

This implementation stores session state in Redis with the following key structure:

  • Single state: {prefix}{sessionId}:{stateKey} - Redis String containing JSON
  • List state: {prefix}{sessionId}:{stateKey}:list - Redis List containing JSON items
  • AgentStateStore marker: {prefix}{sessionId}:_keys - Redis Set tracking all state keys
  • Incremental list storage (only appends new items)
  • Type-safe state serialization using Jackson
  • Automatic session key tracking
Redis-based session implementation using Redisson.
  • Method Details

    • builder

      public static RedissonAgentStateStore.Builder builder()
      Deprecated.
      Creates a new builder for RedissonAgentStateStore.
      Returns:
      a new Builder instance
    • supportsVersioning

      public boolean supportsVersioning()
      Deprecated.
      Specified by:
      supportsVersioning in interface io.agentscope.core.state.AgentStateStore
    • save

      public void save(String userId, String sessionId, String key, io.agentscope.core.state.State value)
      Deprecated.
      Specified by:
      save in interface io.agentscope.core.state.AgentStateStore
    • getVersioned

      public <T extends io.agentscope.core.state.State> io.agentscope.core.state.VersionedState<T> getVersioned(String userId, String sessionId, String key, Class<T> type)
      Deprecated.
      Specified by:
      getVersioned in interface io.agentscope.core.state.AgentStateStore
    • saveIfVersion

      public long saveIfVersion(String userId, String sessionId, String key, io.agentscope.core.state.State value, long expectedVersion)
      Deprecated.
      Specified by:
      saveIfVersion in interface io.agentscope.core.state.AgentStateStore
    • save

      public void save(String userId, String sessionId, String key, List<? extends io.agentscope.core.state.State> values)
      Deprecated.
      Specified by:
      save in interface io.agentscope.core.state.AgentStateStore
    • get

      public <T extends io.agentscope.core.state.State> Optional<T> get(String userId, String sessionId, String key, Class<T> type)
      Deprecated.
      Specified by:
      get in interface io.agentscope.core.state.AgentStateStore
    • getList

      public <T extends io.agentscope.core.state.State> List<T> getList(String userId, String sessionId, String key, Class<T> itemType)
      Deprecated.
      Specified by:
      getList in interface io.agentscope.core.state.AgentStateStore
    • exists

      public boolean exists(String userId, String sessionId)
      Deprecated.
      Specified by:
      exists in interface io.agentscope.core.state.AgentStateStore
    • delete

      public void delete(String userId, String sessionId)
      Deprecated.
      Specified by:
      delete in interface io.agentscope.core.state.AgentStateStore
    • listSessionIds

      public Set<String> listSessionIds(String userId)
      Deprecated.
      Specified by:
      listSessionIds in interface io.agentscope.core.state.AgentStateStore
    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface io.agentscope.core.state.AgentStateStore
    • clearAllSessions

      public reactor.core.publisher.Mono<Integer> clearAllSessions()
      Deprecated.
      Clear all sessions stored in Redis (for testing or cleanup).
      Returns:
      Mono that completes with the number of deleted session keys