From 0fce64f60d929ef1acedac62f1407e68bf1a0694 Mon Sep 17 00:00:00 2001 From: danielshaya Date: Fri, 29 May 2015 15:26:25 +0100 Subject: [PATCH] CHENT-31 First commit. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4205dd28c..366b82a94 100644 --- a/README.md +++ b/README.md @@ -1250,29 +1250,29 @@ ChronicleMap doesn't resize automatically. It is assumed you will make the virt larger than you need and it will handle this reasonably efficiently. With the default settings you will run out of space between 1 and 2 million entries. -You should set the .entries(..) and .entrySize(..) to those you require. +You should set the .entries(..) and .averageValueSize(..) to those you require. ##### Don't forget to set the EntrySize -If you put() and entry that is much larger than the max entry size set via entrySize(), +If you put() and entry that is much larger than the max entry size set via averageValueSize(), the code will error. To see how to set the entry size the example below sets the entry size to 10, you should pick a size that is the size in bytes of your entries : ```java ChronicleMap map = ChronicleMapBuilder.of(Integer.class, String.class) - .entrySize(10).create(); + .averageValueSize(10).create(); ``` -This example will throw an java.lang.IllegalArgumentException because the entrySize is too small. +This example will throw an java.lang.IllegalArgumentException because the averageValueSize is too small. ```java @Test public void test() throws IOException, InterruptedException { ChronicleMap map = ChronicleMapBuilder.of(Integer.class, String.class) - .entrySize(10).create(); + .averageValueSize(10).create(); String value = new String(new char[2000]); map.put(1, value); @@ -1290,7 +1290,7 @@ you will get a *malloc_error_break* : public void test() throws IOException, InterruptedException { ChronicleMap map = ChronicleMapBuilder.of(Integer.class, String.class) - .entrySize(10).create(); + .averageValueSize(10).create(); String value = new String(new char[20000000]); map.put(1, value);