HCOLL-352 Changed garbage-free Chronicle-Map iterations API from old to new Contexts; Add SegmentContexts API

This commit is contained in:
leventov
2015-07-24 20:11:58 +03:00
parent 912a3cc2fc
commit 9fe1dab477
32 changed files with 196 additions and 231 deletions
@@ -36,15 +36,15 @@ public class VanillaChronicleMapConverter<K, V> extends AbstractChronicleMapConv
@Override
public void marshal(Object o, final HierarchicalStreamWriter writer, final MarshallingContext
marshallingContext) {
((ChronicleMap<K, V>) o).forEachEntry(c -> {
((ChronicleMap<K, V>) o).forEachEntry(e -> {
writer.startNode("entry");
{
final Object key = c.key();
final Object key = e.key().get();
writer.startNode(key.getClass().getName());
marshallingContext.convertAnother(key);
writer.endNode();
Object value = c.get();
Object value = e.value().get();
writer.startNode(value.getClass().getName());
marshallingContext.convertAnother(value);
writer.endNode();