mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Fix bugs with key/value average/constant size computation in ChronicleMapBuilder
This commit is contained in:
+5
-2
@@ -244,19 +244,22 @@ public final class SerializationBuilder<E> implements Cloneable, Serializable {
|
||||
}
|
||||
|
||||
public SerializationBuilder<E> maxSize(long maxSize) {
|
||||
this.maxSize = maxSize;
|
||||
if (copyingInterop == CopyingInterop.FROM_MARSHALLER) {
|
||||
this.maxSize = maxSize;
|
||||
metaInteropProvider(CopyingMetaBytesInterop
|
||||
.<E, BytesMarshaller<E>>providerForBytesMarshaller(
|
||||
instancesAreMutable, maxSize));
|
||||
} else if (copyingInterop == CopyingInterop.FROM_WRITER) {
|
||||
this.maxSize = maxSize;
|
||||
metaInteropProvider(CopyingMetaBytesInterop
|
||||
.<E, BytesWriter<E>>providerForBytesWriter(instancesAreMutable));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public long maxSize() {
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
public long serializationSize(E sampleObject) {
|
||||
Object originalInterop = this.interop;
|
||||
Provider interopProvider = Provider.of(originalInterop.getClass());
|
||||
|
||||
Reference in New Issue
Block a user