Infinispan file store with pre-loaded data

半世苍凉 提交于 2019-12-13 06:16:40

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/39628895/infinispan-file-store-with-pre-loaded-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!