diff --git a/ReadMe.adoc b/ReadMe.adoc index 2f0334891..166c15c7e 100755 --- a/ReadMe.adoc +++ b/ReadMe.adoc @@ -1,12 +1,19 @@ = Chronicle Map +<<<<<<< HEAD Chronicle Map is a super-fast, in-memory, key-value store, designed for low-latency, and/or multi-process applications such as trading and financial market applications. +======= +Chronicle Map is a super-fast, in-memory, non-blocking, key-value store, designed for low-latency, and/or multi-process +applications such as trading and financial market applications. +See <> for more information. +>>>>>>> origin/doco_refresh The size of a Chronicle Map is not limited by memory (RAM), but rather by the available disk capacity. image::docs\images\CM_Overview.jpg[] +<<<<<<< HEAD == Prerequisites To run Chronicle Map, please ensure you have first installed: @@ -14,6 +21,8 @@ To run Chronicle Map, please ensure you have first installed: * Java (1.8.0_91 or later) * Apache Maven (3.2.3 or later) +======= +>>>>>>> origin/doco_refresh === Use cases Chronicle Map is used in production around the world for: @@ -29,11 +38,21 @@ distributed across multiple machines. Chronicle Map is: • **fast**. Millions of operations per second, with +<<<<<<< HEAD low and stable microsecond latencies. • **reliable**. Chronicle Software have a “chaos monkey” test which verifies Chronicle Map multi-master replication in the face of node and network failures. +======= +low and stable microsecond latencies for reads and writes. Write queries scale well up +to the number of hardware execution threads in the server. Read queries never block each +other. +• **reliable**. Chronicle Software have a “chaos +monkey” test which verifies Chronicle Map +multi-master replication in the face of node +and network failures. The map can optionally be persisted to disk. +>>>>>>> origin/doco_refresh • **in production** at banks and hedge funds, globally. • **built using lessons learnt** from real-world @@ -50,6 +69,11 @@ your own. === Replication Environment Example The following diagram shows an example of Chronicle Map replication over three servers (or sites). +<<<<<<< HEAD +======= +Chronicle Map Replication is part of Chronicle Map (Enterprise Edition); a commercially supported +version of our successful open source Chronicle Map. +>>>>>>> origin/doco_refresh image::docs\images\Configure_Three_Way_Replication.png[] diff --git a/docs/CM_Download.adoc b/docs/CM_Download.adoc index abb5df5bd..b48589bbb 100755 --- a/docs/CM_Download.adoc +++ b/docs/CM_Download.adoc @@ -8,6 +8,15 @@ Neil Clifford toc::[] +<<<<<<< HEAD +======= +== Prerequisites + +To run Chronicle Map, please ensure you have first installed: + +* Java (1.8.0_91 or later) +* Apache Maven (3.2.3 or later) +>>>>>>> origin/doco_refresh == License diff --git a/docs/CM_Features.adoc b/docs/CM_Features.adoc index a089a8cc4..a1d1bb9e8 100755 --- a/docs/CM_Features.adoc +++ b/docs/CM_Features.adoc @@ -18,7 +18,11 @@ applications, such as trading and financial market applications. - **High concurrency**: Write queries scale well up to the number of hardware execution threads in the server. Read queries never block each other. - **Persistence to disk** - (Optional) +<<<<<<< HEAD - **Multi-key queries** - (Optional, closed-source) - Eventually-consistent, fully-redundant, asynchronous replication across +======= + - **Multi-master replication** - (Optional, commercial functionality) - Eventually-consistent, fully-redundant, asynchronous replication across +>>>>>>> origin/doco_refresh servers, "last write wins" strategy by default, allows to implement custom https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type[state-based CRDT] strategy. == Unique features diff --git a/docs/CM_Replication.adoc b/docs/CM_Replication.adoc index a6ee2efcf..949f7e511 100755 --- a/docs/CM_Replication.adoc +++ b/docs/CM_Replication.adoc @@ -167,6 +167,7 @@ The following example uses a basic `yaml` configuration file to define defaults [source, yaml] .... !ReplicatedMapCfg { +<<<<<<< HEAD hostId: 1, # host id must be unique within the cluster listenAddressHostPort: "localhost:9301", # address on which to listen for inbound replication requests @@ -182,6 +183,21 @@ mapLogDirectory: target/mapReplicationLogs, # directory where replication events keysAreConstantSize: true, # determines how keys are serialised valuesAreConstantSize: true # determines how values are serialised +======= + hostId: 1, # host id must be unique within the cluster + listenAddressHostPort: "localhost:9301", # address on which to listen for inbound replication requests + entries: 10000, # entries hint suggesting the initial size of the map + keyClass: !type long, # class of the key type + valueClass: !type long, # class of the value type + exampleKey: 17, # an example key (used to size the map) + exampleValue: 37, # an example value (used to size the map) + name: testLongToLongMap, # a name for the map (used to determine filename) + locator: "csp://localhost:9301/map/test", # a locator, used for discovery + mapFileDataDirectory: target/mapData, # directory where map file should be stored + mapLogDirectory: target/mapReplicationLogs, # directory where replication events should be recorded + keysAreConstantSize: true, # determines how keys are serialised + valuesAreConstantSize: true # determines how values are serialised +>>>>>>> origin/doco_refresh } .... diff --git a/pom.xml b/pom.xml index d1a65d85e..5527c745d 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ net.openhft java-parent-pom - 1.1.12 + 1.1.13 @@ -45,7 +45,7 @@ net.openhft chronicle-bom - 1.14.51 + 1.14.79 pom import diff --git a/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java b/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java new file mode 100644 index 000000000..b4ee8f840 --- /dev/null +++ b/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java @@ -0,0 +1,28 @@ +package net.openhft.chronicle.map; + +import net.openhft.chronicle.wire.AbstractMarshallable; +import org.junit.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +public final class AbstractMarshallableKeyValueTest { + + @Test + public void shouldAcceptAbstractMarshallableComponents() throws Exception { + final ChronicleMap map = ChronicleMapBuilder.of(Key.class, Value.class).entries(10). + averageKey(new Key()).averageValue(new Value()).create(); + + map.put(new Key(), new Value()); + + assertThat(map.get(new Key()).number, is(new Value().number)); + } + + private static final class Key extends AbstractMarshallable { + private String k = "key"; + } + + private static final class Value extends AbstractMarshallable { + private Integer number = Integer.valueOf(17); + } +}