HCOLL-161 eliminated inconsistency between VanillaChronicleMap and DirectBytesBuffer serializers

This commit is contained in:
leventov
2014-10-07 20:11:39 +04:00
parent 593f0fe7b8
commit 4913062481
3 changed files with 6 additions and 5 deletions
@@ -823,7 +823,8 @@ public class ChronicleMapBuilder<K, V> implements Cloneable {
public ChronicleMap<K, V> create() throws IOException {
VanillaChronicleMap<K, ?, ?, V, ?, ?> map = newMap();
BytesStore bytesStore = new DirectStore(objectSerializer(), map.sizeInBytes(), true);
BytesStore bytesStore = new DirectStore(JDKObjectSerializer.INSTANCE,
map.sizeInBytes(), true);
map.createMappedStoreAndSegments(bytesStore);
return establishReplication(map);
}
@@ -200,7 +200,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
long createMappedStoreAndSegments(File file) throws IOException {
return createMappedStoreAndSegments(new MappedStore(file, FileChannel.MapMode.READ_WRITE,
sizeInBytes(), objectSerializer));
sizeInBytes(), JDKObjectSerializer.INSTANCE));
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {