Skip to content

hangchow/fkv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Fkv is a fast key-value store written in java, it applies to embedded scene. It is suitable for the scene where record quantity not huge but has a very frequently reading and writing requirement.

Advantage

Weakness

  • Fixed record size, key length and value length when create new Fkv database.
  • Large memory usage because of total value cache

Architecture

architect

Exmaple

	File dbFile = new File("/tmp/fkvtest.db"); 
	// load old database or create new one(if file not exists) witch can store 10000 records  
	Fkv fkv = new FkvImpl(dbFile, 10000, 8, 10); 
	// key must be 8 byte size
	String key = "01234567"; 
	// value must be 10 byte size
	String value = "0123456789"; 
	fkv.put(key, value);
	fkv.delete(key);
	fkv.get(key);
	fkv.close();

Feedback

http://weibo.com/seanlinwang xailnx@gmail.com

Releases

No releases published

Packages

No packages published

Languages