From 3ab0e6d86fdff9031fdb743cbe5a1e1cbf534670 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Sun, 21 Dec 2014 09:13:37 +0000 Subject: [PATCH] changed the wording arround - ``` java .of(CharSequence.class, DataValueClasses.directClassFor(BondVOInterface.class)) ``` --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d443da1b0..bcefe2ed5 100644 --- a/README.md +++ b/README.md @@ -461,8 +461,9 @@ lets say that it is only the `coupon` field that we are interested in, then its deserialise the whole object that implements the `BondVOInterface`. The `ChronicleMapBuilder` will look a the types of keys and values that you use, If the value type is a simple accessor/mutator interface that is exposing a non nested pojo, which uses simple types like `CharSequence` and primitives with corresponding get..() and - set..() methods, Chronicle is able to generate off heap poxies so the whole object is not desrialized each - time it is accessed, The off heap poxies are able to read + set..() methods, Chronicle is able to generate off heap poxies so the whole object is not + deserialized each + time it is accessed, The off heap proxies are able to read and write into the off heap data structures directly, this reduced serialisation can give you a big performance boost. Below we show you how you can work directly with the off heap entries. @@ -474,18 +475,16 @@ ChronicleMap map = ChronicleMapBuilder .create(); ``` -notice that the +notice that the the builder is passed a wrapped value type ``` java .of(CharSequence.class, DataValueClasses.directClassFor(BondVOInterface.class)) ``` -we have to wrap the interface ( in this example the BondVOInterface ), with DataValueClasses -.directClassFor(...) method, in -order -to tell the builder that we are going to work directly with the off heap entries. +this is order to tell the builder that we are going to work directly with the off heap +entries. -value class, in our case `BondVOInterface.class` is an `interface` rather than a `class`, now +The value class, in our case `BondVOInterface.class` is an `interface` rather than a `class`, now like before, we can use the `getUsing(key,using)` method, but this time we have to create the ‘using’ instance slightly differently, we have to call either the `map.newValueInstance()` or `map.newKeyInstance()` method.