All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.whitbeck.rdbparser.package-info Maven / Gradle / Ivy

/**
 * Copyright (c) 2015-2018 John Whitbeck. All rights reserved.
 *
 * 

The use and distribution terms for this software are covered by the * Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) * which can be found in the file al-v20.txt at the root of this distribution. * By using this software in any fashion, you are agreeing to be bound by * the terms of this license. * *

You must not remove this notice, or any other, from this software. */ /** * Provides a simple Redis RDB file parser for Java. * *

This library does the minimal amount of work to read entries (e.g. a new DB selector, or a * key/value pair with an expiry) from an RDB file, mostly limiting itself to returning byte arrays * or lists of byte arrays for keys and values. The caller is responsible for application-level * decisions like how to interpret the contents of the returned byte arrays or what types of objects * to instantiate from them. * *

For example, sorted sets and hashes are parsed as a flat list of value/score pairs and * key/value pairs, respectively. Simple Redis values are parsed as a singleton. As expected, Redis * lists and sets are parsed as lists of values. * *

Furthermore, this library performs lazy decoding of the packed encodings (ZipMap, ZipList, * Hashmap as ZipList, Sorted Set as ZipList, and Intset) such that those are only decoded when * needed. This allows the caller to efficiently skip over these entries or defer their decoding to * a worker thread. * *

RDB files created by all versions of Redis through 4.0.x are supported (i.e., RDB versions 1 * through 8). Redis modules, introduced in RDB version 8, are not currently supported. If you need * them, please open an issue or a pull request. * *

Implemenation is not thread safe. * *

The last RDB format version is 8. The source of truth is the rdb.h file in the Redis repo. The following resources provide a good * overview of the RDB format up to version 7 (as of December 2017). * *

*/ package net.whitbeck.rdbparser;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy