Feature |
Availability |
In-memory off-heap Map |
Open-source
|
Persistence to disk |
Remote calls |
Closed-source, on-demand |
Eventually-consistent replication (100% redundancy) |
Partially-redundant replication |
Synchronous replication |
Entry expiration timeouts |
### Peer projects
- [Chronicle Engine](https://github.com/OpenHFT/Chronicle-Engine) - reactive processing framework
supporting Chronicle Map as a backend.
- [Chronicle Enterprise](http://chronicle.software/products/chronicle-enterprise/) - extended
version of Chronicle Engine.
- [Chronicle Journal](
http://vanillajava.blogspot.com/2015/09/chronicle-journal-customizable-data.html) - another
key-value built by Chronicle Software, with different properties.
## Chronicle Map 3 Tutorial
#### Contents
- [Difference between Chronicle Map 2 and 3](#difference-between-chronicle-map-2-and-3)
- [Download the library](#download-the-library)
- [Create a `ChronicleMap` Instance](#create-a-chroniclemap-instance)
- [In-memory Chronicle Map](#in-memory-chronicle-map)
- [Persisted Chronicle Map](#persisted-chronicle-map)
- [Recovery](#recovery)
- [Key and Value Types](#key-and-value-types)
- [Custom serializers](#custom-serializers)
- [Custom `CharSequence` encoding](#custom-charsequence-encoding)
- [Custom serialization checklist](#custom-serialization-checklist)
- [`ChronicleMap` usage patterns](#chroniclemap-usage-patterns)
- [Single-key queries](#single-key-queries)
- [Multi-key queries](#multi-key-queries)
- [Entry checksums](#entry-checksums)
- [Close `ChronicleMap`](#close-chroniclemap)
- [Behaviour Customization](#behaviour-customization)
- [Example - Simple logging](#example---simple-logging)
- [Example - BiMap](#example---bimap)
- [Example - Monitor Chronicle Map statistics](#example---monitor-chronicle-map-statistics)
### Difference between Chronicle Map 2 and 3
Functional changes in Chronicle Map 3:
- Chronicle Map 3 has [formal data store specification](spec), that verbalizes [the guarantees
which the data store provides](spec/1-design-goals.md#guarantees-1) and gives a way to verify those
guarantees.
- Added support for multi-key queries.
- "Listeners" mechanism fully reworked, see the [Behaviour Customization](#behaviour-customization)
section. This has a number of important consequences, most notable is:
- Possibility to define replication eventual-consistency strategy, different from "last write
wins", e. g. any state-based CRDT.
- "Stateless clients" functionality (i. e. remote calls) is moved to [Chronicle Engine](
https://github.com/OpenHFT/Chronicle-Engine).
- Replication is done via [Chronicle Engine](https://github.com/OpenHFT/Chronicle-Engine).
- Chronicle Map 2 has hard creation-time limit on the number of entries storable in a Chronicle
Map. If the size exceeds this limit, an exception is thrown. In Chronicle Map 3, this limitation
is removed, though the number of entries still has to be configured on the Chronicle Map creation,
exceeding this configured limit is possible, but discouraged. See the [Number of entries
configuration](#number-of-entries-configuration) section.
- Chronicle Map 3 supports [entry checksums](#entry-checksums) that allows to detect data
corruption, hence brings additional safety.
- Chronicle Map 3 allows to [recover](#recovery) after failures and corruptions.
- A number of smaller improvements and fixes.
Non-functional changes:
- Chronicle Map 3 requires Java version 8 or newer, while Chronicle Map 2 supports Java 7.
- Chronicle Map 3 has [versioning policy](docs/versioning.md) and [compatibility policy](
docs/compatibility.md). Chronicle Map 2 doesn't have such documents.
If you use Chronicle Map 2, you might be looking for [Chronicle Map 2 Tutorial](
https://github.com/OpenHFT/Chronicle-Map/tree/2.1#contents) or [Chronicle Map 2 Javadoc](
http://www.javadoc.io/doc/net.openhft/chronicle-map/2.3.9/).
### Download the library
#### Maven Artifact Download
[](https://maven-badges.herokuapp.com/maven-central/net.openhft/chronicle-map)
```xml