HCOLL-301 Refactor the windows warning.

This commit is contained in:
danielshaya
2015-06-02 18:23:30 +01:00
parent 21e0647d10
commit a26a2682b2
3 changed files with 5 additions and 34 deletions
@@ -18,6 +18,7 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.core.OS;
import net.openhft.chronicle.hash.ChronicleHashBuilder;
import net.openhft.chronicle.hash.ChronicleHashInstanceBuilder;
import net.openhft.chronicle.hash.impl.ChronicleHashBuilderImpl;
@@ -1359,7 +1360,7 @@ public final class ChronicleMapBuilder<K, V> implements
try {
// pushingToMapEventListener();
VanillaChronicleMap<K, ?, ?, V, ?, ?, ?> map = newMap(singleHashReplication, channel);
map.warnOnWindows();
OS.warnOnWindows(map.sizeInBytes());
BytesStore bytesStore = new DirectStore(JDKObjectSerializer.INSTANCE,
map.sizeInBytes(), true);
map.createMappedStoreAndSegments(bytesStore);