1 Star 1 Fork 0

Alvin / LocalCache

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

LocalCache

介绍

LocalCache是一个高速本地缓存框架,使用了MMAP的模式,实现了高性能的数据缓存和读取

使用说明

实例化缓存对象

Config config = new Config();
config.setCACHE_FILE_SIZE(1024*1024*1024);
config.setCAHCE_FILE_NUM(100);
LocalCache localCache = new LocalCache("d:\\test",config);

写入数据

localCache.write((str).getBytes());

读取数据

//增加channel
channel = localCache.addChannel("channel1",false);
byte[] data = channel.read();

注意

写入数据和每个chennel读取数据仅支持单线程操作

Repository Comments ( 0 )

Sign in to post a comment

About

No description expand collapse
Java
MulanPSL-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/nathanial/local-cache.git
git@gitee.com:nathanial/local-cache.git
nathanial
local-cache
LocalCache
master

Search