mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Removed ChronicleMapBuilder.alignedEntrySize() in favor of simply entrySize()
This commit is contained in:
@@ -126,7 +126,7 @@ public class ChronicleMapBuilder<K, V> implements Cloneable {
|
||||
|
||||
private int tryMinSegments(int min, int max) {
|
||||
for (int i = min; i < max; i <<= 1) {
|
||||
if (i * i * i >= alignedEntrySize() * 2)
|
||||
if (i * i * i >= entrySize() * 2)
|
||||
return i;
|
||||
}
|
||||
return max;
|
||||
@@ -292,7 +292,7 @@ public class ChronicleMapBuilder<K, V> implements Cloneable {
|
||||
*/
|
||||
public int entrySize() {
|
||||
if (entrySize > 0)
|
||||
return entrySize;
|
||||
return entryAndValueAlignment().alignSize(entrySize);
|
||||
int size = metaDataBytes;
|
||||
int keySize = keySize();
|
||||
size += keyBuilder.sizeMarshaller().sizeEncodingSize(keySize);
|
||||
@@ -318,10 +318,6 @@ public class ChronicleMapBuilder<K, V> implements Cloneable {
|
||||
return entryAndValueAlignment().alignSize(size);
|
||||
}
|
||||
|
||||
int alignedEntrySize() {
|
||||
return entryAndValueAlignment().alignSize(entrySize());
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures alignment strategy of address in memory of entries and independently of address
|
||||
* in memory of values within entries in ChronicleMaps, created by this builder.
|
||||
|
||||
@@ -124,7 +124,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
lockTimeOutNS = builder.lockTimeOut(TimeUnit.NANOSECONDS);
|
||||
|
||||
// this.replicas = builder.replicas();
|
||||
this.entrySize = builder.alignedEntrySize();
|
||||
this.entrySize = builder.entrySize();
|
||||
this.alignment = builder.entryAndValueAlignment();
|
||||
|
||||
this.errorListener = builder.errorListener();
|
||||
|
||||
Reference in New Issue
Block a user