首页 > 解决方案 > 是否可以使用 jpa 在 apache ignite 中实现读取和写入?

问题描述

我想用 Apache ignite 从底层数据库读取和写入数据。我正在做一个 Spring Boot 应用程序,所以我只想知道我是否可以使用 JPA 功能?

标签: spring-bootjpaignite

解决方案


据我了解,Apache Ignite 没有实现任何 JPA API。因此,您无法以 JPA 方式访问存储在 Ignite 中的数据。

但是,您可以使用 JPA 在 Ignite 中缓存数据,同时将数据写入和读取底层 JPA 存储。在这种情况下,您将需要实现自己的CacheStore. 示例:https ://github.com/gridgain/gridgain-advanced-examples/tree/master/src/main/java/org/gridgain/examples/datagrid/store (这是基于Mongo但你可以重写它来使用JPA)。


推荐阅读