Skip to content
Spring AI 文档版本 2.1.0-SNAPSHOT 源快照 b42e1742 更新于 2026-10-16

访问原生客户端

Coherence 向量库实现通过 getNativeClient() 方法提供对底层原生 Coherence 客户端(Session)的访问:

java
CoherenceVectorStore vectorStore = context.getBean(CoherenceVectorStore.class);
Optional<Session> nativeClient = vectorStore.getNativeClient();

if (nativeClient.isPresent()) {
    Session session = nativeClient.get();
    // Use the native client for Coherence-specific operations
}

原生客户端让你得以访问那些可能未通过 VectorStore 接口暴露的 Coherence 特定功能与操作。

BytesRouter 是社区翻译站点,所有译文仅供参考,一切以官方英文原文为准。