mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
updated the readme to reflect the new simple single builder
This commit is contained in:
@@ -426,20 +426,26 @@ bond.getCoupon()
|
||||
|
||||
```
|
||||
lets say that it is only the `coupon` field that we are interested in, then its better not to have to
|
||||
deserialize the whole object that implements the `BondVOInterface`. Chronicle will look a the types of keys
|
||||
and values that you set up in the builder, If the value type is a simple accessor/mutator interfaces
|
||||
inother words a simple interface that is exposing non nested pojo with coresonding getX() and setX()
|
||||
methods Chronicle is able to be act in a more efficient way, by just deserialize the field(s) that we
|
||||
require, in this
|
||||
example just the coupon. This is why we created
|
||||
the`ChronicleMapBuilder`, when you use this builder chronicle will not create on heap copies of your whole data structure. You can instead use proxy objects that can read and write into the off heap data structures, this reduced serialisation can give you a big performance boost. Below we show you how you can work directly with the off heap entries.
|
||||
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 String 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,
|
||||
So when you specify a simple Pojo interface you access the off heap memory via an internal proxy
|
||||
object, it is 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.
|
||||
|
||||
``` java
|
||||
ChronicleMap<String, BondVOInterface> chm = ChronicleMapBuilder
|
||||
.of(String.class, BondVOInterface.class)
|
||||
.keySize(10)
|
||||
.create();
|
||||
```
|
||||
```
|
||||
|
||||
notice that the
|
||||
|
||||
|
||||
Reference in New Issue
Block a user