package com.easyagents.agent.runtime.persistence.session.noop;

import com.easyagents.agent.runtime.persistence.session.AgentSessionStore;
import io.agentscope.core.state.State;

import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Set;

/**
 * 空操作会话存储。
 */
public enum NoopAgentSessionStore implements AgentSessionStore {
    INSTANCE;

    @Override
    public void save(String sessionKey, String name, State state) {
    }

    @Override
    public void saveList(String sessionKey, String name, List<? extends State> states) {
    }

    @Override
    public <T extends State> Optional<T> get(String sessionKey, String name, Class<T> type) {
        return Optional.empty();
    }

    @Override
    public <T extends State> List<T> getList(String sessionKey, String name, Class<T> itemType) {
        return Collections.emptyList();
    }

    @Override
    public boolean exists(String sessionKey) {
        return false;
    }

    @Override
    public void delete(String sessionKey) {
    }

    @Override
    public Set<String> listSessionKeys() {
        return Collections.emptySet();
    }
}
