具有预加载数据的Infinispan文件存储 [英] Infinispan file store with pre-loaded data
问题描述
我正在使用infinispan作为缓存提供程序.我有一个包含键(长)值(字符串)对的平面文件.在应用程序加载时,我希望嵌入式infinispan缓存以平面文件作为存储开始,以便平面文件的内容成为记录系统,并且文件的内容由infinispan缓存.随着新记录被添加到缓存中,我希望附加平面文件.infinispan有可能吗?
I am using infinispan as cache provider. I have a flat file containing key (long) value (string) pairs. Upon application load time, i want an embedded infinispan cache to start with flat file as the storage so that the contents of the flat file is the system of record and the contents of the file is cached by infinispan. As new records get added to cache, i want the flat file to be appended. Is it possible with infinispan?
推荐答案
原则上是,您必须实现自己的缓存加载器/存储,该读取器/存储将读取和修改该文件.签出SingleFileStore,以实现SPI的简单实现(SingleFileStore是基于文件的通用存储).
Principially yes, you have to implement you own cache loader/store that will read and modify that file. Checkout SingleFileStore for a simple implementation of the SPI (SingleFileStore is general-purpose file-based store).
这篇关于具有预加载数据的Infinispan文件存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!