mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Reduced accessability of multimaps
This commit is contained in:
@@ -26,7 +26,7 @@ import net.openhft.chronicle.hash.serialization.SizeMarshaller;
|
||||
import net.openhft.chronicle.hash.serialization.internal.MetaBytesInterop;
|
||||
import net.openhft.chronicle.hash.serialization.internal.MetaBytesWriter;
|
||||
import net.openhft.chronicle.hash.serialization.internal.MetaProvider;
|
||||
import net.openhft.chronicle.map.utils.MultiMapFactory;
|
||||
import net.openhft.chronicle.map.MultiMapFactory;
|
||||
import net.openhft.chronicle.set.ChronicleSetBuilder;
|
||||
import net.openhft.lang.Maths;
|
||||
import net.openhft.lang.io.ByteBufferBytes;
|
||||
@@ -439,6 +439,17 @@ public abstract class AbstractChronicleMapBuilder<K, V,
|
||||
return segments <= maxSegments ? segments : -segments;
|
||||
}
|
||||
|
||||
|
||||
int segmentHeaderSize() {
|
||||
int segments = actualSegments();
|
||||
// reduce false sharing unless we have a lot of segments.
|
||||
return segments <= 8192 ? 64 : 16;
|
||||
}
|
||||
|
||||
MultiMapFactory multiMapFactory() {
|
||||
return MultiMapFactory.forCapacity(actualEntriesPerSegment());
|
||||
}
|
||||
|
||||
public B lockTimeOut(long lockTimeOut, TimeUnit unit) {
|
||||
this.lockTimeOut = lockTimeOut;
|
||||
lockTimeOutUnit = unit;
|
||||
@@ -933,15 +944,5 @@ public abstract class AbstractChronicleMapBuilder<K, V,
|
||||
return (int) Math.min(Math.max(2L, entries() >> 10),
|
||||
VanillaChronicleMap.MAX_ENTRY_OVERSIZE_FACTOR);
|
||||
}
|
||||
|
||||
int segmentHeaderSize() {
|
||||
int segments = actualSegments();
|
||||
// reduce false sharing unless we have a lot of segments.
|
||||
return segments <= 8192 ? 64 : 16;
|
||||
}
|
||||
|
||||
public MultiMapFactory multiMapFactory() {
|
||||
return MultiMapFactory.forCapacity(actualEntriesPerSegment());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user