mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
CHENT-67 make putReturnsNull and remoteReturnsNull configurations in Chronicle Map not peristent [Application of b6426edbd2]
This commit is contained in:
@@ -76,17 +76,17 @@ public class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super
|
||||
// Event listener and meta data
|
||||
public final int metaDataBytes;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Behavior
|
||||
final boolean putReturnsNull;
|
||||
final boolean removeReturnsNull;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Memory management and dependent fields
|
||||
public final Alignment alignment;
|
||||
public final int worstAlignment;
|
||||
public final boolean couldNotDetermineAlignmentBeforeAllocation;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Behavior
|
||||
transient boolean putReturnsNull;
|
||||
transient boolean removeReturnsNull;
|
||||
|
||||
transient Set<Entry<K, V>> entrySet;
|
||||
|
||||
public transient MapEntryOperations<K, V, R> entryOperations;
|
||||
@@ -95,7 +95,6 @@ public class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super
|
||||
|
||||
transient ThreadLocal<ChainingInterface> cxt;
|
||||
|
||||
|
||||
public VanillaChronicleMap(ChronicleMapBuilder<K, V> builder) throws IOException {
|
||||
super(builder);
|
||||
SerializationBuilder<V> valueBuilder = builder.valueBuilder;
|
||||
@@ -126,10 +125,6 @@ public class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super
|
||||
// Event listener and meta data
|
||||
metaDataBytes = builder.metaDataBytes();
|
||||
|
||||
// Behavior
|
||||
putReturnsNull = builder.putReturnsNull();
|
||||
removeReturnsNull = builder.removeReturnsNull();
|
||||
|
||||
// Concurrency (number of segments), memory management and dependent fields
|
||||
alignment = builder.valueAlignment();
|
||||
worstAlignment = builder.worstAlignment();
|
||||
@@ -142,6 +137,9 @@ public class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super
|
||||
}
|
||||
|
||||
void initTransientsFromBuilder(ChronicleMapBuilder<K, V> builder) {
|
||||
putReturnsNull = builder.putReturnsNull();
|
||||
removeReturnsNull = builder.removeReturnsNull();
|
||||
|
||||
this.entryOperations = (MapEntryOperations<K, V, R>) builder.entryOperations;
|
||||
this.methods = (MapMethods<K, V, R>) builder.methods;
|
||||
this.defaultValueProvider = builder.defaultValueProvider;
|
||||
|
||||
Reference in New Issue
Block a user