EZDB —— LevelDB 的 Java 封装

栏目: 数据库 · 发布时间: 8年前

内容简介:EZDB —— LevelDB 的 Java 封装

EZDB 为LevelDB 提供一个很好的 Java 封装。

功能包括:

  • Key/value 查询

  • Hash/range 查询 (类似 Amazon 的 DynamoDB)

  • 可插入式的序列化

  • 可插入式的范围主键排序

  • 值的多版本支持

  • 提供 JNI 和纯 Java 两种实现

示例代码:

Db ezdb = new EzLevelDb(new File("/tmp"));
Table<Integer, Integer> table = ezdb.getTable("simple", IntegerSerde.get, IntegerSerde.get);
table.put(1213, "20120101-bang", 1357);
table.put(1213, "20120102-foo", 1234);
table.put(1213, "20120102-bar", 5678);
table.put(2324, "20120102-baz", 2468);
table.put(1213, "20120103-baz", 3579);
table.put(1213, 12345678);

TableIterator<Integer, String, Integer> it = table.range(1213, "20120102", "20120103");

while(it.hasNext()) {
  System.out.println(it.next().getValue());
}

以上所述就是小编给大家介绍的《EZDB —— LevelDB 的 Java 封装》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Refactoring

Refactoring

Martin Fowler、Kent Beck、John Brant、William Opdyke、Don Roberts / Addison-Wesley Professional / 1999-7-8 / USD 64.99

Refactoring is about improving the design of existing code. It is the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its int......一起来看看 《Refactoring》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码